en-us/dbatools-help.xml
<?xml version="1.0" encoding="utf-8"?><helpItems schema="maml"><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Select-DbaObject</command:name><command:noun>DbaObject</command:noun><command:verb>Select</command:verb><maml:description><maml:para>Wrapper around Select-Object, extends property parameter.</maml:para></maml:description></command:details><maml:description><maml:para>Wrapper around Select-Object, extends property parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Select-DbaObject</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object(s) to select from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>The properties to select. - Supports hashtables, which will be passed through to Select-Object. </maml:para><maml:para>- Supports renaming as it is possible in SQL: "Length AS Size" will select the Length property but rename it to size. </maml:para><maml:para>- Supports casting to a specified type: "Address to IPAddress" or "Length to int". </maml:para><maml:para>Uses PowerShell type-conversion. - Supports parsing numbers to sizes: "Length size GB:2" Converts numeric input (presumed to be bytes) to gigabyte with two decimals. Also supports toggling on Unit descriptors by adding another element: "Length size GB:2:1" - Supports selecting properties from objects in other variables: "ComputerName from VarName" (Will insert the property 'ComputerName' from variable $VarName) </maml:para><maml:para>- Supports filtering when selecting from outside objects: "ComputerName from VarName where ObjectId = Id" (Will insert the property 'ComputerName' from the object in variable $VarName, whose ObjectId property is equal to the inputs Id property)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProperty</maml:name><maml:description><maml:para>Properties to not list.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExpandProperty</maml:name><maml:description><maml:para>Properties to expand.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>Create an alias property. This can be in simple SQL notation, such as "Length as Size" or a hashtable with the alias name being the key and the referenced property being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptProperty</maml:name><maml:description><maml:para>Add script properties to the object. This parameter takes a hashtable that can be either simply Name --> Scriptblock binding (for readonly properties) or Name --> Hashtable binding, with the inner hashtable containing two keys: get & set. Each pointing at their respective scriptblock. </maml:para><maml:para>-ScriptProperty @{ </maml:para><maml:para>DoubleSize = { $this.Length * 2} </maml:para><maml:para>MegaSize = @{ </maml:para><maml:para>get = { $this.Length * 10 } </maml:para><maml:para>set = { $this.Length = $_ / 10 } </maml:para><maml:para>} </maml:para><maml:para>}</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptMethod</maml:name><maml:description><maml:para>Add script methods to the object. This can be done using either: </maml:para><maml:para>- String syntax 'GetDouble => $this.Length * 2' </maml:para><maml:para>- Hashtable defining any number of methods, with the name being the key and the scriptblock being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unique</maml:name><maml:description><maml:para>Do not list multiples of the same value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Select the last n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>First</maml:name><maml:description><maml:para>Select the first n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>Skip the first (or last if used with -Last) n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Indicates that the cmdlet turns off optimization. Windows PowerShell runs commands in the order that they appear in the command pipeline and lets them generate all objects. By default, if you include a Select-DbaObject command with the First or Index parameters in a command pipeline, Windows PowerShell stops the command that generates the objects as soon as the selected number of objects is generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowProperty</maml:name><maml:description><maml:para>Only the specified properties will be shown by default. Supersedes ShowExcludeProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowExcludeProperty</maml:name><maml:description><maml:para>Hides the specified properties from the default display style of the output object. Is ignored if used together with ShowProperty.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Adds a typename to the selected object. Will automatically prefix the module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepInputObject</maml:name><maml:description><maml:para>Keeps the original input object, adding new properties the select added without removing any. This allows you to use this command to add properties without losing the input object's type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Select-DbaObject</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object(s) to select from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>The properties to select. - Supports hashtables, which will be passed through to Select-Object. </maml:para><maml:para>- Supports renaming as it is possible in SQL: "Length AS Size" will select the Length property but rename it to size. </maml:para><maml:para>- Supports casting to a specified type: "Address to IPAddress" or "Length to int". </maml:para><maml:para>Uses PowerShell type-conversion. - Supports parsing numbers to sizes: "Length size GB:2" Converts numeric input (presumed to be bytes) to gigabyte with two decimals. Also supports toggling on Unit descriptors by adding another element: "Length size GB:2:1" - Supports selecting properties from objects in other variables: "ComputerName from VarName" (Will insert the property 'ComputerName' from variable $VarName) </maml:para><maml:para>- Supports filtering when selecting from outside objects: "ComputerName from VarName where ObjectId = Id" (Will insert the property 'ComputerName' from the object in variable $VarName, whose ObjectId property is equal to the inputs Id property)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProperty</maml:name><maml:description><maml:para>Properties to not list.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExpandProperty</maml:name><maml:description><maml:para>Properties to expand.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>Create an alias property. This can be in simple SQL notation, such as "Length as Size" or a hashtable with the alias name being the key and the referenced property being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptProperty</maml:name><maml:description><maml:para>Add script properties to the object. This parameter takes a hashtable that can be either simply Name --> Scriptblock binding (for readonly properties) or Name --> Hashtable binding, with the inner hashtable containing two keys: get & set. Each pointing at their respective scriptblock. </maml:para><maml:para>-ScriptProperty @{ </maml:para><maml:para>DoubleSize = { $this.Length * 2} </maml:para><maml:para>MegaSize = @{ </maml:para><maml:para>get = { $this.Length * 10 } </maml:para><maml:para>set = { $this.Length = $_ / 10 } </maml:para><maml:para>} </maml:para><maml:para>}</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptMethod</maml:name><maml:description><maml:para>Add script methods to the object. This can be done using either: </maml:para><maml:para>- String syntax 'GetDouble => $this.Length * 2' </maml:para><maml:para>- Hashtable defining any number of methods, with the name being the key and the scriptblock being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unique</maml:name><maml:description><maml:para>Do not list multiples of the same value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipLast</maml:name><maml:description><maml:para>Skip the last n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowProperty</maml:name><maml:description><maml:para>Only the specified properties will be shown by default. Supersedes ShowExcludeProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowExcludeProperty</maml:name><maml:description><maml:para>Hides the specified properties from the default display style of the output object. Is ignored if used together with ShowProperty.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Adds a typename to the selected object. Will automatically prefix the module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepInputObject</maml:name><maml:description><maml:para>Keeps the original input object, adding new properties the select added without removing any. This allows you to use this command to add properties without losing the input object's type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Select-DbaObject</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object(s) to select from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unique</maml:name><maml:description><maml:para>Do not list multiples of the same value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Indicates that the cmdlet turns off optimization. Windows PowerShell runs commands in the order that they appear in the command pipeline and lets them generate all objects. By default, if you include a Select-DbaObject command with the First or Index parameters in a command pipeline, Windows PowerShell stops the command that generates the objects as soon as the selected number of objects is generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Index</maml:name><maml:description><maml:para>Specifies an array of objects based on their index values. Enter the indexes in a comma-separated list.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowProperty</maml:name><maml:description><maml:para>Only the specified properties will be shown by default. Supersedes ShowExcludeProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowExcludeProperty</maml:name><maml:description><maml:para>Hides the specified properties from the default display style of the output object. Is ignored if used together with ShowProperty.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Adds a typename to the selected object. Will automatically prefix the module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepInputObject</maml:name><maml:description><maml:para>Keeps the original input object, adding new properties the select added without removing any. This allows you to use this command to add properties without losing the input object's type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>Create an alias property. This can be in simple SQL notation, such as "Length as Size" or a hashtable with the alias name being the key and the referenced property being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectAliasParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProperty</maml:name><maml:description><maml:para>Properties to not list.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExpandProperty</maml:name><maml:description><maml:para>Properties to expand.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>First</maml:name><maml:description><maml:para>Select the first n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Index</maml:name><maml:description><maml:para>Specifies an array of objects based on their index values. Enter the indexes in a comma-separated list.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object(s) to select from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepInputObject</maml:name><maml:description><maml:para>Keeps the original input object, adding new properties the select added without removing any. This allows you to use this command to add properties without losing the input object's type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Select the last n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>The properties to select. - Supports hashtables, which will be passed through to Select-Object. </maml:para><maml:para>- Supports renaming as it is possible in SQL: "Length AS Size" will select the Length property but rename it to size. </maml:para><maml:para>- Supports casting to a specified type: "Address to IPAddress" or "Length to int". </maml:para><maml:para>Uses PowerShell type-conversion. - Supports parsing numbers to sizes: "Length size GB:2" Converts numeric input (presumed to be bytes) to gigabyte with two decimals. Also supports toggling on Unit descriptors by adding another element: "Length size GB:2:1" - Supports selecting properties from objects in other variables: "ComputerName from VarName" (Will insert the property 'ComputerName' from variable $VarName) </maml:para><maml:para>- Supports filtering when selecting from outside objects: "ComputerName from VarName where ObjectId = Id" (Will insert the property 'ComputerName' from the object in variable $VarName, whose ObjectId property is equal to the inputs Id property)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaSelectParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptMethod</maml:name><maml:description><maml:para>Add script methods to the object. This can be done using either: </maml:para><maml:para>- String syntax 'GetDouble => $this.Length * 2' </maml:para><maml:para>- Hashtable defining any number of methods, with the name being the key and the scriptblock being the value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptMethodParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptProperty</maml:name><maml:description><maml:para>Add script properties to the object. This parameter takes a hashtable that can be either simply Name --> Scriptblock binding (for readonly properties) or Name --> Hashtable binding, with the inner hashtable containing two keys: get & set. Each pointing at their respective scriptblock. </maml:para><maml:para>-ScriptProperty @{ </maml:para><maml:para>DoubleSize = { $this.Length * 2} </maml:para><maml:para>MegaSize = @{ </maml:para><maml:para>get = { $this.Length * 10 } </maml:para><maml:para>set = { $this.Length = $_ / 10 } </maml:para><maml:para>} </maml:para><maml:para>}</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.SelectScriptPropertyParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowExcludeProperty</maml:name><maml:description><maml:para>Hides the specified properties from the default display style of the output object. Is ignored if used together with ShowProperty.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowProperty</maml:name><maml:description><maml:para>Only the specified properties will be shown by default. Supersedes ShowExcludeProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>Skip the first (or last if used with -Last) n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipLast</maml:name><maml:description><maml:para>Skip the last n items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Adds a typename to the selected object. Will automatically prefix the module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unique</maml:name><maml:description><maml:para>Do not list multiples of the same value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Indicates that the cmdlet turns off optimization. Windows PowerShell runs commands in the order that they appear in the command pipeline and lets them generate all objects. By default, if you include a Select-DbaObject command with the First or Index parameters in a command pipeline, Windows PowerShell stops the command that generates the objects as soon as the selected number of objects is generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para></maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> ---------------- Example 1: Renaming a property ---------------- </maml:title><maml:introduction></maml:introduction><dev:code> Get-ChildItem | Select-DbaObject Name, "Length as Size" </dev:code><dev:remarks><maml:para> Selects the properties Name and Length, renaming Length to Size in the process. </maml:para><maml:para> _ </maml:para></dev:remarks></command:example><command:example><maml:title> ------------------ Example 2: Converting type ------------------ </maml:title><maml:introduction></maml:introduction><dev:code> Import-Csv .\file.csv | Select-DbaObject Name, "Length as Size to DbaSize" </dev:code><dev:remarks><maml:para> Selects the properties Name and Length, renaming Length to Size and converting it to [DbaSize] (a userfriendly representation of size numbers contained in the dbatools module) </maml:para><maml:para> _ </maml:para></dev:remarks></command:example><command:example><maml:title> ---------- Example 3: Selecting from another object 1 ---------- </maml:title><maml:introduction></maml:introduction><dev:code> $obj = [PSCustomObject]@{ Name = "Foo" } Get-ChildItem | Select-DbaObject FullName, Length, "Name from obj" </dev:code><dev:remarks><maml:para> Selects the properties FullName and Length from the input and the Name property from the object stored in $obj </maml:para><maml:para> _ </maml:para></dev:remarks></command:example><command:example><maml:title> ---------- Example 4: Selecting from another object 2 ---------- </maml:title><maml:introduction></maml:introduction><dev:code> $list = @() $list += [PSCustomObject]@{ Type = "Foo"; ID = 1 } $list += [PSCustomObject]@{ Type = "Bar"; ID = 2 } $obj | Select-DbaObject Name, "ID from list WHERE Type = Name" </dev:code><dev:remarks><maml:para> This allows you to LEFT JOIN contents of another variable. Note that it can only do simple property-matching at this point. </maml:para><maml:para> It will select Name from the objects stored in $obj, and for each of those the ID Property on any object in $list that has a Type property of equal value as Name on the input. </maml:para><maml:para> _ </maml:para></dev:remarks></command:example><command:example><maml:title> ---------------- Example 5: Naming and styling ---------------- </maml:title><maml:introduction></maml:introduction><dev:code> Get-ChildItem | Select-DbaObject Name, Length, FullName, Used, LastWriteTime, Mode -TypeName MyType -ShowExcludeProperty Mode, Used </dev:code><dev:remarks><maml:para> Lists all items in the current path, selects the properties specified (whether they exist or not) , then ... </maml:para><maml:para> - Sets the name to "MyType" </maml:para><maml:para> - Hides the properties "Mode" and "Used" from the default display set, causing them to be hidden from default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Documentation</maml:linkText><maml:uri>https://dbatools.io/Select-DbaObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets configuration entries.</maml:para></maml:description></command:details><maml:description><maml:para>This function creates or changes configuration values. These can be used to provide dynamic configuration information outside the PowerShell variable system.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbatoolsConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of a configuration element. Must be namespaced <dbatools>.<Name>. The name can have any number of sub-segments, in order to better group configurations thematically.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The value to assign to the named configuration element.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Using this, the configuration setting is given a description, making it easier for a user to comprehend, what a specific setting is for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Validation</maml:name><maml:description><maml:para>The name of the validation script used for input validation. These can be used to validate make sure that input is of the proper data type. New validation scripts can be registered using Register-DbatoolsConfigValidation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Handler</maml:name><maml:description><maml:para>A scriptblock that is executed when a value is being set. Is only executed if the validation was successful (assuming there was a validation, of course)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Scriptblock</command:parameterValue><dev:type><maml:name>Scriptblock</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hidden</maml:name><maml:description><maml:para>Setting this parameter hides the configuration from casual discovery. Configurations with this set will only be returned by Get-Config, if the parameter "-Force" is used. This should be set for all system settings a user should have no business changing (e.g. for Infrastructure related settings such as mail server).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Setting this parameter causes the system to treat this configuration as a default setting. If the configuration already exists, no changes will be performed. Useful in scenarios where for some reason it is not practical to automatically set defaults before loading userprofiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Use this when setting configurations as part of module import. When initializing a configuration, it will only do a thing if the configuration hasn't already been initialized (So if you load the module multiple times or in multiple runspaces, it won't make a difference) Also, if there already was a non-initialized setting set for a given configuration, it will then try to set the old value again. This value will be processed by handlers, if any are set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SimpleExport</maml:name><maml:description><maml:para>Enabling this will cause the module to use friendly json notation on export to file. This may result in loss of data precision, but makes it easier to edit settings in file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleExport</maml:name><maml:description><maml:para>Using 'Export-DbatoolsConfig -ModuleName <dbatools>' settings flagged with this switch will be exported to a default path if they have been changed from the initial default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableValidation</maml:name><maml:description><maml:para>This parameters disables the input validation - if any - when processing a setting. Normally this shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableHandler</maml:name><maml:description><maml:para>This parameter disables the configuration handlers. Configuration handlers are designed to automatically process input set to a config value, in addition to writing the value. In many cases, this is used to improve performance, by forking the value location also to a static C#-field, which is then used, rather than searching a Hashtable. Normally these shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Return the changed configuration setting object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbatoolsConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of a configuration element. Must be namespaced <dbatools>.<Name>. The name can have any number of sub-segments, in order to better group configurations thematically.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PersistedValue</maml:name><maml:description><maml:para>In most circumstances an internal parameter. Applies the serialized value to a setting. Used for restoring data from configuration files that should only be deserialized when the module consuming it is already imported.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PersistedType</maml:name><maml:description><maml:para>In most circumstances an internal parameter. Paired with PersistedValue, used to specify the data type of the serialized object set in its serialized state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigurationValueType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigurationValueType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Using this, the configuration setting is given a description, making it easier for a user to comprehend, what a specific setting is for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Validation</maml:name><maml:description><maml:para>The name of the validation script used for input validation. These can be used to validate make sure that input is of the proper data type. New validation scripts can be registered using Register-DbatoolsConfigValidation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Handler</maml:name><maml:description><maml:para>A scriptblock that is executed when a value is being set. Is only executed if the validation was successful (assuming there was a validation, of course)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Scriptblock</command:parameterValue><dev:type><maml:name>Scriptblock</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hidden</maml:name><maml:description><maml:para>Setting this parameter hides the configuration from casual discovery. Configurations with this set will only be returned by Get-Config, if the parameter "-Force" is used. This should be set for all system settings a user should have no business changing (e.g. for Infrastructure related settings such as mail server).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Setting this parameter causes the system to treat this configuration as a default setting. If the configuration already exists, no changes will be performed. Useful in scenarios where for some reason it is not practical to automatically set defaults before loading userprofiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Use this when setting configurations as part of module import. When initializing a configuration, it will only do a thing if the configuration hasn't already been initialized (So if you load the module multiple times or in multiple runspaces, it won't make a difference) Also, if there already was a non-initialized setting set for a given configuration, it will then try to set the old value again. This value will be processed by handlers, if any are set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SimpleExport</maml:name><maml:description><maml:para>Enabling this will cause the module to use friendly json notation on export to file. This may result in loss of data precision, but makes it easier to edit settings in file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleExport</maml:name><maml:description><maml:para>Using 'Export-DbatoolsConfig -ModuleName <dbatools>' settings flagged with this switch will be exported to a default path if they have been changed from the initial default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableValidation</maml:name><maml:description><maml:para>This parameters disables the input validation - if any - when processing a setting. Normally this shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableHandler</maml:name><maml:description><maml:para>This parameter disables the configuration handlers. Configuration handlers are designed to automatically process input set to a config value, in addition to writing the value. In many cases, this is used to improve performance, by forking the value location also to a static C#-field, which is then used, rather than searching a Hashtable. Normally these shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Return the changed configuration setting object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbatoolsConfig</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>This allows grouping configuration elements into groups based on the module/component they serve. If this parameter is not set, the configuration element must have a module name in the name parameter (the first segment will be taken, irrespective of whether that makes sense).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the configuration entry. If an entry of exactly this non-casesensitive name already exists, its value will be overwritten. Duplicate names across different modules are possible and will be treated separately. If a name contains namespace notation and no module is set, the first namespace element will be used as module instead of name. Example: -Name "Nordwind.Server" Is Equivalent to -Name "Server" -Module "Nordwind"</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The value to assign to the named configuration element.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Using this, the configuration setting is given a description, making it easier for a user to comprehend, what a specific setting is for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Validation</maml:name><maml:description><maml:para>The name of the validation script used for input validation. These can be used to validate make sure that input is of the proper data type. New validation scripts can be registered using Register-DbatoolsConfigValidation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Handler</maml:name><maml:description><maml:para>A scriptblock that is executed when a value is being set. Is only executed if the validation was successful (assuming there was a validation, of course)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Scriptblock</command:parameterValue><dev:type><maml:name>Scriptblock</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hidden</maml:name><maml:description><maml:para>Setting this parameter hides the configuration from casual discovery. Configurations with this set will only be returned by Get-Config, if the parameter "-Force" is used. This should be set for all system settings a user should have no business changing (e.g. for Infrastructure related settings such as mail server).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Setting this parameter causes the system to treat this configuration as a default setting. If the configuration already exists, no changes will be performed. Useful in scenarios where for some reason it is not practical to automatically set defaults before loading userprofiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Use this when setting configurations as part of module import. When initializing a configuration, it will only do a thing if the configuration hasn't already been initialized (So if you load the module multiple times or in multiple runspaces, it won't make a difference) Also, if there already was a non-initialized setting set for a given configuration, it will then try to set the old value again. This value will be processed by handlers, if any are set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SimpleExport</maml:name><maml:description><maml:para>Enabling this will cause the module to use friendly json notation on export to file. This may result in loss of data precision, but makes it easier to edit settings in file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleExport</maml:name><maml:description><maml:para>Using 'Export-DbatoolsConfig -ModuleName <dbatools>' settings flagged with this switch will be exported to a default path if they have been changed from the initial default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableValidation</maml:name><maml:description><maml:para>This parameters disables the input validation - if any - when processing a setting. Normally this shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableHandler</maml:name><maml:description><maml:para>This parameter disables the configuration handlers. Configuration handlers are designed to automatically process input set to a config value, in addition to writing the value. In many cases, this is used to improve performance, by forking the value location also to a static C#-field, which is then used, rather than searching a Hashtable. Normally these shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Return the changed configuration setting object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Setting this parameter causes the system to treat this configuration as a default setting. If the configuration already exists, no changes will be performed. Useful in scenarios where for some reason it is not practical to automatically set defaults before loading userprofiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Using this, the configuration setting is given a description, making it easier for a user to comprehend, what a specific setting is for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableHandler</maml:name><maml:description><maml:para>This parameter disables the configuration handlers. Configuration handlers are designed to automatically process input set to a config value, in addition to writing the value. In many cases, this is used to improve performance, by forking the value location also to a static C#-field, which is then used, rather than searching a Hashtable. Normally these shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableValidation</maml:name><maml:description><maml:para>This parameters disables the input validation - if any - when processing a setting. Normally this shouldn't be circumvented, but just in case, it can be disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of a configuration element. Must be namespaced <dbatools>.<Name>. The name can have any number of sub-segments, in order to better group configurations thematically.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Handler</maml:name><maml:description><maml:para>A scriptblock that is executed when a value is being set. Is only executed if the validation was successful (assuming there was a validation, of course)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Scriptblock</command:parameterValue><dev:type><maml:name>Scriptblock</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hidden</maml:name><maml:description><maml:para>Setting this parameter hides the configuration from casual discovery. Configurations with this set will only be returned by Get-Config, if the parameter "-Force" is used. This should be set for all system settings a user should have no business changing (e.g. for Infrastructure related settings such as mail server).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Use this when setting configurations as part of module import. When initializing a configuration, it will only do a thing if the configuration hasn't already been initialized (So if you load the module multiple times or in multiple runspaces, it won't make a difference) Also, if there already was a non-initialized setting set for a given configuration, it will then try to set the old value again. This value will be processed by handlers, if any are set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>This allows grouping configuration elements into groups based on the module/component they serve. If this parameter is not set, the configuration element must have a module name in the name parameter (the first segment will be taken, irrespective of whether that makes sense).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleExport</maml:name><maml:description><maml:para>Using 'Export-DbatoolsConfig -ModuleName <dbatools>' settings flagged with this switch will be exported to a default path if they have been changed from the initial default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the configuration entry. If an entry of exactly this non-casesensitive name already exists, its value will be overwritten. Duplicate names across different modules are possible and will be treated separately. If a name contains namespace notation and no module is set, the first namespace element will be used as module instead of name. Example: -Name "Nordwind.Server" Is Equivalent to -Name "Server" -Module "Nordwind"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Return the changed configuration setting object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PersistedType</maml:name><maml:description><maml:para>In most circumstances an internal parameter. Paired with PersistedValue, used to specify the data type of the serialized object set in its serialized state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigurationValueType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigurationValueType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PersistedValue</maml:name><maml:description><maml:para>In most circumstances an internal parameter. Applies the serialized value to a setting. Used for restoring data from configuration files that should only be deserialized when the module consuming it is already imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SimpleExport</maml:name><maml:description><maml:para>Enabling this will cause the module to use friendly json notation on export to file. This may result in loss of data precision, but makes it easier to edit settings in file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Validation</maml:name><maml:description><maml:para>The name of the validation script used for input validation. These can be used to validate make sure that input is of the proper data type. New validation scripts can be registered using Register-DbatoolsConfigValidation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The value to assign to the named configuration element.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para></maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> ---------------------- Example 1: Simple ---------------------- </maml:title><maml:introduction></maml:introduction><dev:code> C:\PS> Set-DbatoolsConfig -FullName Path.DbatoolsData -Value E:\temp\dbatools </dev:code><dev:remarks><maml:para> Updates the configuration entry for Path.DbatoolsData to E:\temp\dbatools </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Documentation</maml:linkText><maml:uri>https://dbatools.io/Set-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaAgDatabase</command:name><command:noun>DbaAgDatabase</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds database(s) to an Availability Group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Adds database(s) to an Availability Group on a SQL Server instance.</maml:para><maml:para>After checking for prerequisites, the commands runs these five steps for every database:</maml:para><maml:para>* Step 1: Setting seeding mode if needed.</maml:para><maml:para> - If -SeedingMode is used and the current seeding mode of the replica is not in the desired mode, the seeding mode of the replica is changed.</maml:para><maml:para> - The seeding mode will not be changed back but stay in this mode.</maml:para><maml:para> - If the seeding mode is changed to Automatic, the necessary rights to create databases will be granted.</maml:para><maml:para>* Step 2: Running backup and restore if needed.</maml:para><maml:para> - Action is only taken for replicas with a desired seeding mode of Manual and where the database does not yet exist.</maml:para><maml:para> - If -UseLastBackup is used, the restore will be performed based on the backup history of the database.</maml:para><maml:para> - Otherwise a full and log backup will be taken at the primary and those will be restored at the replica using the same folder structure.</maml:para><maml:para>* Step 3: Add the database to the Availability Group on the primary replica.</maml:para><maml:para> - This step is skipped, if the database is already part of the Availability Group.</maml:para><maml:para>* Step 4: Add the database to the Availability Group on the secondary replicas.</maml:para><maml:para> - This step is skipped for those replicas, where the database is already joined to the Availability Group.</maml:para><maml:para>* Step 5: Wait for the database to finish joining the Availability Group on the secondary replicas.</maml:para><maml:para>Use Test-DbaAvailabilityGroup with -AddDatabase to test if all prerequisites are met.</maml:para><maml:para>If you have special requirements for the setup for the database at the replicas,</maml:para><maml:para>perform the backup and restore part with Backup-DbaDatabase and Restore-DbaDatabase in advance.</maml:para><maml:para>Please make sure that the last log backup has been restored before running Add-DbaAgDatabase.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaAgDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The primary replica of the Availability Group. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group where the databases will be added.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to add.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port. This parameter can be used to only add the databases on specific secondary replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual uses full and log backup to initially transfer the data to the secondary replica. The command skips this if the database is found in restoring state at the secondary replica. If not specified, the setting from the availability group replica will be used. Otherwise the setting will be updated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full and log backup of the database. A log backup must be the last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedBackupParams</maml:name><maml:description><maml:para>Provide additional parameters to the backup command as a hashtable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-DbaAgDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group where the databases will be added.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port. This parameter can be used to only add the databases on specific secondary replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase, Get-DbaDbSharePoint and more.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual uses full and log backup to initially transfer the data to the secondary replica. The command skips this if the database is found in restoring state at the secondary replica. If not specified, the setting from the availability group replica will be used. Otherwise the setting will be updated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full and log backup of the database. A log backup must be the last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedBackupParams</maml:name><maml:description><maml:para>Provide additional parameters to the backup command as a hashtable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedBackupParams</maml:name><maml:description><maml:para>Provide additional parameters to the backup command as a hashtable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group where the databases will be added.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to add.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase, Get-DbaDbSharePoint and more.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port. This parameter can be used to only add the databases on specific secondary replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual uses full and log backup to initially transfer the data to the secondary replica. The command skips this if the database is found in restoring state at the secondary replica. If not specified, the setting from the availability group replica will be used. Otherwise the setting will be updated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The primary replica of the Availability Group. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full and log backup of the database. A log backup must be the last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net | Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaAgDatabase -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1, db2 -Confirm </dev:code><dev:remarks><maml:para> Adds db1 and db2 to ag1 on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017a | Out-GridView -Passthru | Add-DbaAgDatabase -AvailabilityGroup ag1 </dev:code><dev:remarks><maml:para> Adds selected databases from sql2017a to ag1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSharePoint -SqlInstance sqlcluster | Add-DbaAgDatabase -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> Adds SharePoint databases as found in SharePoint_Config on sqlcluster to ag1 on sqlcluster </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSharePoint -SqlInstance sqlcluster -ConfigDatabase SharePoint_Config_2019 | Add-DbaAgDatabase -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> Adds SharePoint databases as found in SharePoint_Config_2019 on sqlcluster to ag1 on sqlcluster </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaAgDatabase -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1 -Secondary sql2017b -SeedingMode Manual -SharedPath \\FS\Backup -AdvancedBackupParams @{ CompressBackup = $true ; FileCount = 3 } </dev:code><dev:remarks><maml:para> Adds db1 to ag1 on sql2017a and sql2017b. Uses compression and three files while taking the backups. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaAgDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaAgListener</command:name><command:noun>DbaAgListener</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a listener to an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a listener to an availability group on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaAgListener</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the SqlInstance instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The Availability Group to which a listener will be bestowed upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the listener. If one is not specified, the Availability Group name will be used. Note that Name cannot be used with Multiple Ags.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Sets the IP address(es) of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetIP</maml:name><maml:description><maml:para>Sets the Subnet IP address(es) of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetMask</maml:name><maml:description><maml:para>Sets the subnet IP mask(s) of the availability group listener. Defaults to 255.255.255.0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the port number used to communicate with the availability group. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dhcp</maml:name><maml:description><maml:para>Indicates whether the listener uses DHCP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the listener, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The Availability Group to which a listener will be bestowed upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dhcp</maml:name><maml:description><maml:para>Indicates whether the listener uses DHCP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Sets the IP address(es) of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the listener. If one is not specified, the Availability Group name will be used. Note that Name cannot be used with Multiple Ags.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the listener, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the port number used to communicate with the availability group. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the SqlInstance instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetIP</maml:name><maml:description><maml:para>Sets the Subnet IP address(es) of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetMask</maml:name><maml:description><maml:para>Sets the subnet IP mask(s) of the availability group listener. Defaults to 255.255.255.0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaAgListener -SqlInstance sql2017 -AvailabilityGroup SharePoint -IPAddress 10.0.20.20 </dev:code><dev:remarks><maml:para> Creates a listener on 10.0.20.20 port 1433 for the SharePoint availability group on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017 -AvailabilityGroup availabilitygroup1 | Add-DbaAgListener -Dhcp </dev:code><dev:remarks><maml:para> Creates a listener on port 1433 with a dynamic IP for the group1 availability group on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaAgListener -SqlInstance sql2017 -AvailabilityGroup SharePoint -IPAddress 10.0.20.20,10.1.77.77 -SubnetMask 255.255.252.0 </dev:code><dev:remarks><maml:para> Creates a multi-subnet listener with 10.0.20.20 and 10.1.77.77, on two /22 subnets, on port 1433 for the SharePoint availability group on sql2017. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaAgListener</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaAgReplica</command:name><command:noun>DbaAgReplica</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a replica to an availability group on one or more SQL Server instances.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a replica to an availability group on one or more SQL Server instances.</maml:para><maml:para>Automatically creates database mirroring endpoints if required.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaAgReplica</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instances using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the replica. Defaults to the SQL Server instance name. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: Wsfc, External or None. Defaults to Wsfc (Windows Server Failover Cluster). The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ClusterType' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic and Manual. Automatic is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Specifies the connection intent mode of an Availability Replica in primary role. AllowAllConnections by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Specifies the connection modes of an Availability Replica in secondary role. Options include: AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections Defaults to AllowNoConnections. The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ConnectionModeInSecondaryRole' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>By default, this command will attempt to find a DatabaseMirror endpoint. If one does not exist, it will create it. If an endpoint must be created, the name "hadr_endpoint" will be used. If an alternative is preferred, use Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>By default, the property Fqdn of Get-DbaEndpoint is used as EndpointUrl. Use EndpointUrl if a different URL is required due to special network configurations. EndpointUrl has to be an array of strings in format 'TCP://system-address:port', one entry for every instance. See details at: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/specify-endpoint-url-adding-or-modifying-availability-replica If an endpoint must be created, EndpointUrl will be used for configuration, if system-address is an ipv4 address.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the replica, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>Sets the read only routing ordered list of replica server names to use when redirecting read-only connections through this availability replica. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Specifies that the endpoint is to authenticate the connection using the certificate specified by certificate_name to establish identity for authorization. The far endpoint must have a certificate with the public key matching the private key of the specified certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigureXESession</maml:name><maml:description><maml:para>Configure the AlwaysOn_health extended events session to start automatically as the SSMS wizard would do. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-extended-events#BKMK_alwayson_health</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionTimeout</maml:name><maml:description><maml:para>How many seconds an availability replica waits for a ping response from a connected replica before considering the connection to have failed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="16" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Specifies that the endpoint is to authenticate the connection using the certificate specified by certificate_name to establish identity for authorization. The far endpoint must have a certificate with the public key matching the private key of the specified certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: Wsfc, External or None. Defaults to Wsfc (Windows Server Failover Cluster). The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ClusterType' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigureXESession</maml:name><maml:description><maml:para>Configure the AlwaysOn_health extended events session to start automatically as the SSMS wizard would do. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-extended-events#BKMK_alwayson_health</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Specifies the connection intent mode of an Availability Replica in primary role. AllowAllConnections by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Specifies the connection modes of an Availability Replica in secondary role. Options include: AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections Defaults to AllowNoConnections. The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ConnectionModeInSecondaryRole' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>By default, this command will attempt to find a DatabaseMirror endpoint. If one does not exist, it will create it. If an endpoint must be created, the name "hadr_endpoint" will be used. If an alternative is preferred, use Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>By default, the property Fqdn of Get-DbaEndpoint is used as EndpointUrl. Use EndpointUrl if a different URL is required due to special network configurations. EndpointUrl has to be an array of strings in format 'TCP://system-address:port', one entry for every instance. See details at: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/specify-endpoint-url-adding-or-modifying-availability-replica If an endpoint must be created, EndpointUrl will be used for configuration, if system-address is an ipv4 address.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic and Manual. Automatic is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the replica. Defaults to the SQL Server instance name. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the replica, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>Sets the read only routing ordered list of replica server names to use when redirecting read-only connections through this availability replica. This parameter is only supported if the replica is added to just one instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionTimeout</maml:name><maml:description><maml:para>How many seconds an availability replica waits for a ping response from a connected replica before considering the connection to have failed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instances using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017a -AvailabilityGroup SharePoint | Add-DbaAgReplica -SqlInstance sql2017b </dev:code><dev:remarks><maml:para> Adds sql2017b to the SharePoint availability group on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017a -AvailabilityGroup SharePoint | Add-DbaAgReplica -SqlInstance sql2017b -FailoverMode Manual </dev:code><dev:remarks><maml:para> Adds sql2017b to the SharePoint availability group on sql2017a with a manual failover mode. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017a -AvailabilityGroup SharePoint | Add-DbaAgReplica -SqlInstance sql2017b -EndpointUrl 'TCP://sql2017b.specialnet.local:5022' </dev:code><dev:remarks><maml:para> Adds sql2017b to the SharePoint availability group on sql2017a with a custom endpoint URL. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaAgReplica</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaComputerCertificate</command:name><command:noun>DbaComputerCertificate</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a computer certificate - useful for older systems.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a computer certificate from a local or remote computer.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaComputerCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password for the certificate, if it is password protected.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The target certificate object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Security.Cryptography.X509Certificates.X509Certificate2[]</command:parameterValue><dev:type><maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The local path to the target certificate object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store. Default is LocalMachine.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder. Default is My (Personal).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Defines where and how to import the private key of an X.509 certificate. Defaults to: Exportable, PersistKeySet EphemeralKeySet The key associated with a PFX file is created in memory and not persisted on disk when importing a certificate. Exportable Imported keys are marked as exportable. NonExportable Expliictly mark keys as nonexportable. PersistKeySet The key associated with a PFX file is persisted when importing a certificate. UserProtected Notify the user through a dialog box or other method that the key is accessed. The Cryptographic Service Provider (CSP) in use defines the precise behavior. NOTE: This can only be used when you add a certificate to localhost, as it causes a prompt to appear.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The target certificate object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Security.Cryptography.X509Certificates.X509Certificate2[]</command:parameterValue><dev:type><maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Defines where and how to import the private key of an X.509 certificate. Defaults to: Exportable, PersistKeySet EphemeralKeySet The key associated with a PFX file is created in memory and not persisted on disk when importing a certificate. Exportable Imported keys are marked as exportable. NonExportable Expliictly mark keys as nonexportable. PersistKeySet The key associated with a PFX file is persisted when importing a certificate. UserProtected Notify the user through a dialog box or other method that the key is accessed. The Cryptographic Service Provider (CSP) in use defines the precise behavior. NOTE: This can only be used when you add a certificate to localhost, as it causes a prompt to appear.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder. Default is My (Personal).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The local path to the target certificate object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password for the certificate, if it is password protected.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store. Default is LocalMachine.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaComputerCertificate -ComputerName Server1 -Path C:\temp\cert.cer </dev:code><dev:remarks><maml:para> Adds the local C:\temp\cert.cer to the remote server Server1 in LocalMachine\My (Personal). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaComputerCertificate -Path C:\temp\cert.cer </dev:code><dev:remarks><maml:para> Adds the local C:\temp\cert.cer to the local computer's LocalMachine\My (Personal) certificate store. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaComputerCertificate -Path C:\temp\cert.cer </dev:code><dev:remarks><maml:para> Adds the local C:\temp\cert.cer to the local computer's LocalMachine\My (Personal) certificate store. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaComputerCertificate -ComputerName sql01 -Path C:\temp\sql01.pfx -Confirm:$false -Flag NonExportable </dev:code><dev:remarks><maml:para> Adds the local C:\temp\sql01.pfx to sql01's LocalMachine\My (Personal) certificate store and marks the private key as non-exportable. Skips confirmation prompt. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaComputerCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaDbMirrorMonitor</command:name><command:noun>DbaDbMirrorMonitor</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on the server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on the server instance.</maml:para><maml:para>Basically executes sp_dbmmonitoraddmonitoring.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaDbMirrorMonitor</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012 </dev:code><dev:remarks><maml:para> Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on sql2008 and sql2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaDbMirrorMonitor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaDbRoleMember</command:name><command:noun>DbaDbRoleMember</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a Database User to a database role for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Add-DbaDbRoleMember adds users in a database to a database role or roles for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaDbRoleMember</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>The user(s) to add to role(s) specified.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>The user(s) to add to role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, User Author: Ben Miller (@DBAduck) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaDbRoleMember -SqlInstance localhost -Database mydb -Role db_owner -User user1 </dev:code><dev:remarks><maml:para> Adds user1 to the role db_owner in the database mydb on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaDbRoleMember -SqlInstance localhost, sql2016 -Role SqlAgentOperatorRole -User user1 -Database msdb </dev:code><dev:remarks><maml:para> Adds user1 in servers localhost and sql2016 in the msdb database to the SqlAgentOperatorRole </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Add-DbaDbRoleMember -Role SqlAgentOperatorRole -User user1 -Database msdb Adds user1 to the SqlAgentOperatorROle in the msdb database in every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaDbRoleMember -SqlInstance localhost -Role "db_datareader","db_datawriter" -User user1 -Database DEMODB </dev:code><dev:remarks><maml:para> Adds user1 in the database DEMODB on the server localhost to the roles db_datareader and db_datawriter </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost -Role "db_datareader","db_datawriter" -Database DEMODB </dev:code><dev:remarks><maml:para> PS C:\> $roles | Add-DbaDbRoleMember -User user1 Adds user1 in the database DEMODB on the server localhost to the roles db_datareader and db_datawriter </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaDbRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaExtendedProperty</command:name><command:noun>DbaExtendedProperty</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds an extended property</maml:para></maml:description></command:details><maml:description><maml:para>Adds an extended property</maml:para><maml:para>This command works out of the box with databases but you can add extended properties from several different types of objects, including:</maml:para><maml:para>Aggregate</maml:para><maml:para>Assembly</maml:para><maml:para>Column</maml:para><maml:para>Constraint</maml:para><maml:para>Contract</maml:para><maml:para>Database</maml:para><maml:para>Event Notification</maml:para><maml:para>Filegroup</maml:para><maml:para>Function</maml:para><maml:para>Index</maml:para><maml:para>Logical File Name</maml:para><maml:para>Message Type</maml:para><maml:para>Parameter</maml:para><maml:para>Partition Function</maml:para><maml:para>Partition Scheme</maml:para><maml:para>Procedure</maml:para><maml:para>Queue</maml:para><maml:para>Remote Service Binding</maml:para><maml:para>Route</maml:para><maml:para>Rule</maml:para><maml:para>Schema</maml:para><maml:para>Service</maml:para><maml:para>Synonym</maml:para><maml:para>Table</maml:para><maml:para>Trigger</maml:para><maml:para>Type</maml:para><maml:para>View</maml:para><maml:para>Xml Schema Collection</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaExtendedProperty</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Add an extended property to a specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the extended property</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The value for the extended property</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Dba* commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Add an extended property to a specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Dba* commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the extended property</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The value for the extended property</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, ExtendedProperty Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaExtendedProperty -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all extended properties on all databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaExtendedProperty -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the extended properties for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaExtendedProperty -SqlInstance Server1 -Database db1 -Name version -Value "1.0.0" </dev:code><dev:remarks><maml:para> Sets the version extended property for the db1 database to 1.0.0 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance localhost -Database tempdb | Add-DbaExtendedProperty -Name SPVersion -Value 10.2 </dev:code><dev:remarks><maml:para> Creates an extended property for all stored procedures in the tempdb database named SPVersion with a value of 10.2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance localhost -Database mydb -Table mytable | Add-DbaExtendedProperty -Name MyExtendedProperty -Value "This is a test" </dev:code><dev:remarks><maml:para> Creates an extended property named MyExtendedProperty for the mytable table in the mydb, with a value of "This is a test" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaExtendedProperty</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaPfDataCollectorCounter</command:name><command:noun>DbaPfDataCollectorCounter</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a Performance Data Collector Counter.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a Performance Data Collector Counter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaPfDataCollectorCounter</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollector via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollector via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PerfMon Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaPfDataCollectorCounter -ComputerName sql2017 -CollectorSet 'System Correlation' -Collector DataCollector01 -Counter '\LogicalDisk(*)\Avg. Disk Queue Length' </dev:code><dev:remarks><maml:para> Adds the '\LogicalDisk(*)\Avg. Disk Queue Length' counter within the DataCollector01 collector within the System Correlation collector set on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollector | Out-GridView -PassThru | Add-DbaPfDataCollectorCounter -Counter '\LogicalDisk(*)\Avg. Disk Queue Length' -Confirm </dev:code><dev:remarks><maml:para> Allows you to select which Data Collector you'd like to add the counter '\LogicalDisk(*)\Avg. Disk Queue Length' on localhost and prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaPfDataCollectorCounter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds registered servers to SQL Server Central Management Server (CMS) or Local Server Groups</maml:para></maml:description></command:details><maml:description><maml:para>Adds registered servers to SQL Server Central Management Server (CMS) or Local Server Groups. If you need more flexibility, look into Import-DbaRegServer which</maml:para><maml:para>accepts multiple kinds of input and allows you to add reg servers from different CMSes.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaRegServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance if a CMS is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Server Name is the actual SQL instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name is basically the nickname in SSMS Registered Server interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Adds a description for the registered server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Adds the registered server to a specific group. If group does not exist it will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveDirectoryTenant</maml:name><maml:description><maml:para>Active Directory Tenant</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveDirectoryUserId</maml:name><maml:description><maml:para>Active Directory User id</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>SQL Server connection string</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OtherParams</maml:name><maml:description><maml:para>Additional parameters to append to the connection string</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows the piping of a registered server group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ServerObject</maml:name><maml:description><maml:para>SMO Server Objects (from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveDirectoryTenant</maml:name><maml:description><maml:para>Active Directory Tenant</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveDirectoryUserId</maml:name><maml:description><maml:para>Active Directory User id</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>SQL Server connection string</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Adds a description for the registered server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Adds the registered server to a specific group. If group does not exist it will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows the piping of a registered server group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name is basically the nickname in SSMS Registered Server interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OtherParams</maml:name><maml:description><maml:para>Additional parameters to append to the connection string</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Server Name is the actual SQL instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerObject</maml:name><maml:description><maml:para>SMO Server Objects (from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance if a CMS is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServer -SqlInstance sql2008 -ServerName sql01 </dev:code><dev:remarks><maml:para> Creates a registered server on sql2008's CMS which points to the SQL Server, sql01. When scrolling in CMS, the name "sql01" will be visible. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServer -ServerName sql01 </dev:code><dev:remarks><maml:para> Creates a registered server in Local Server Groups which points to the SQL Server, sql01. When scrolling in Registered Servers, the name "sql01" will be visible. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServer -SqlInstance sql2008 -ServerName sql01 -Name "The 2008 Clustered Instance" -Description "HR's Dedicated SharePoint instance" </dev:code><dev:remarks><maml:para> Creates a registered server on sql2008's CMS which points to the SQL Server, sql01. When scrolling in CMS, "The 2008 Clustered Instance" will be visible. Clearly this is hard to explain ;) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServer -SqlInstance sql2008 -ServerName sql01 -Group hr\Seattle </dev:code><dev:remarks><maml:para> Creates a registered server on sql2008's 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Connect-DbaInstance -SqlInstance dockersql1 -SqlCredential sqladmin | Add-DbaRegServer -ServerName mydockerjam </dev:code><dev:remarks><maml:para> Creates a registered server called "mydockerjam" in Local Server Groups that uses SQL authentication and points to the server dockersql1. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaRegServerGroup</command:name><command:noun>DbaRegServerGroup</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds registered server groups to SQL Server Central Management Server (CMS)</maml:para></maml:description></command:details><maml:description><maml:para>Adds registered server groups to SQL Server Central Management Server (CMS). If you need more flexibility, look into Import-DbaRegServer which accepts multiple kinds of input and allows you to add reg servers and groups from different CMS.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaRegServerGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the registered server group.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description for the registered server group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>The SQL Server Central Management Server group. If no groups are specified, the new group will be created at the root. You can pass sub groups using the '\' to split the path. Group\SubGroup will create both folders. Folder 'SubGroup' under 'Group' folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description for the registered server group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>The SQL Server Central Management Server group. If no groups are specified, the new group will be created at the root. You can pass sub groups using the '\' to split the path. Group\SubGroup will create both folders. Folder 'SubGroup' under 'Group' folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the registered server group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServerGroup -SqlInstance sql2012 -Name HR </dev:code><dev:remarks><maml:para> Creates a registered server group called HR, in the root of sql2012's CMS </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaRegServerGroup -SqlInstance sql2012, sql2014 -Name sub-folder -Group HR </dev:code><dev:remarks><maml:para> Creates a registered server group on sql2012 and sql2014 called sub-folder within the HR group </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sql2012, sql2014 -Group HR | Add-DbaRegServerGroup -Name sub-folder </dev:code><dev:remarks><maml:para> Creates a registered server group on sql2012 and sql2014 called sub-folder within the HR group of each server </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaRegServerGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Add-DbaServerRoleMember</command:name><command:noun>DbaServerRoleMember</command:noun><command:verb>Add</command:verb><maml:description><maml:para>Adds a login to a server-level role(s) for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a login to a server-level role(s) for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-DbaServerRoleMember</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-level role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to add to server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to add to server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaServerRole or New-DbaServerRole</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaServerRole or New-DbaServerRole</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to add to server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to add to server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-level role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, Login Author: Shawn Melton (@wsmelton) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1 -ServerRole dbcreator -Login login1 </dev:code><dev:remarks><maml:para> Adds login1 to the dbcreator fixed server-level role on the instance server1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1, sql2016 -ServerRole customrole -Login login1 </dev:code><dev:remarks><maml:para> Adds login1 in customrole custom server-level role on the instance server1 and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1 -ServerRole customrole -Role dbcreator </dev:code><dev:remarks><maml:para> Adds customrole custom server-level role to dbcreator fixed server-level role. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Add-DbaServerRoleMember -ServerRole sysadmin -Login login1 Adds login1 to the sysadmin fixed server-level role in every server in C:\servers.txt. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance localhost -ServerRole bulkadmin, dbcreator -Login login1 </dev:code><dev:remarks><maml:para> Adds login1 on the server localhost to the bulkadmin and dbcreator fixed server-level roles. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaServerRole -SqlInstance localhost -ServerRole bulkadmin, dbcreator </dev:code><dev:remarks><maml:para> PS C:\> $roles | Add-DbaServerRoleMember -Login login1 Adds login1 on the server localhost to the bulkadmin and dbcreator fixed server-level roles. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> PS C:\ $logins = Get-Content C:\logins.txt </dev:code><dev:remarks><maml:para> PS C:\ $srvLogins = Get-DbaLogin -SqlInstance server1 -Login $logins PS C:\ New-DbaServerRole -SqlInstance server1 -ServerRole mycustomrole -Owner sa | Add-DbaServerRoleMember -Login $logins Adds all the logins found in C:\logins.txt to the newly created server-level role mycustomrole on server1. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Add-DbaServerRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Backup-DbaComputerCertificate</command:name><command:noun>DbaComputerCertificate</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.</maml:para></maml:description></command:details><maml:description><maml:para>Backs up a computer certificate - useful for older systems and backing up remote certs to local disk.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-DbaComputerCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Export using a password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The target certificate object. Accepts input from Get-DbaComputerCertificate.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Export to a directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Export to a specific file name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Export type. Options include: Authenticode, Cert, Pfx, Pkcs12, Pkcs7, SerializedCert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Export to a specific file name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The target certificate object. Accepts input from Get-DbaComputerCertificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Export to a directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Export using a password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Export type. Options include: Authenticode, Cert, Pfx, Pkcs12, Pkcs7, SerializedCert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CertBackup, Certificate, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate | Backup-DbaComputerCertificate -Path C:\temp </dev:code><dev:remarks><maml:para> Backs up all certs to C:\temp. Auto-names the files. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate -Thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 | Backup-DbaComputerCertificate -FilePath C:\temp\29C469578D6C6211076A09CEE5C5797EEA0C2713.cer </dev:code><dev:remarks><maml:para> Backs up certificate with the thumbprint 29C469578D6C6211076A09CEE5C5797EEA0C2713 to the temp directory. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Backup-DbaComputerCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Backup-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Backup one or more SQL Server databases from a single SQL Server SqlInstance.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path in which to place the backup files. If not specified, the backups will be placed in the default backup location for SqlInstance. If multiple paths are specified, the backups will be striped across these locations. This will overwrite the FileCount option. If the path does not exist, Sql Server will attempt to create it. Folders are created by the Sql Instance, and checks will be made for write permissions. File Names with be suffixed with x-of-y to enable identifying striped sets, where y is the number of files in the set and x ranges from 1 to y.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The name of the file to backup to. This is only accepted for single database backups. If no name is specified then the backup files will be named DatabaseName_yyyyMMddHHmm (i.e. "Database1_201714022131") with the appropriate extension. If the same name is used repeatedly, SQL Server will add backups to the same file at an incrementing position. SQL Server needs permissions to write to the specified location. Path names are based on the SQL Server (C:\ is the C drive on the SQL Server, not the machine running the script). Passing in NUL as the FilePath will backup to the NUL: device</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementPrefix</maml:name><maml:description><maml:para>If enabled, this will prefix backup files with an incrementing integer (ie; '1-', '2-'). Using this has been alleged to improved restore times on some Azure based SQL Database platforms</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceInName</maml:name><maml:description><maml:para>If this switch is set, the following list of strings will be replaced in the FilePath and Path strings: instancename - will be replaced with the instance Name servername - will be replaced with the server name dbname - will be replaced with the database name timestamp - will be replaced with the timestamp (either the default, or the format provided) backuptype - will be replaced with Full, Log or Differential as appropriate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, CopyOnly backups will be taken. By default function performs a normal backup, these backups interfere with the restore chain of the database. CopyOnly backups will not interfere with the restore chain of the database. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of SQL Server backup to perform. Accepted values are "Full", "Log", "Differential", "Diff", "Database"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CreateFolder</maml:name><maml:description><maml:para>If this switch is enabled, each database will be backed up into a separate folder on each of the paths specified by Path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileCount</maml:name><maml:description><maml:para>This is the number of striped copies of the backups you wish to create. This value is overwritten if you specify multiple Backup Directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>If this switch is enabled, the function will try to perform a compressed backup if supported by the version and edition of SQL Server. Otherwise, this function will use the server(s) default setting for compression.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Checksum</maml:name><maml:description><maml:para>If this switch is enabled, the backup checksum will be calculated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Verify</maml:name><maml:description><maml:para>If this switch is enabled, the backup will be verified by running a RESTORE VERIFYONLY against the SqlInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Sets the size of the unit of transfer. Values must be a multiple of 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5KB, 1KB, 2KB, 4KB, 8KB, 16KB, 32KB or 64KB. This can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>The URL(s) to the base container of an Azure Storage account to write backups to. If specifying the AzureCredential parameter you can only provide 1 value as page blobs do not support multiple URLs If using Shared Access keys, you may specify as many URLs as you want, as long as a corresponding credential exists on the source server. If specified, the only other parameters than can be used are "CopyOnly", "Type", "CompressBackup", "Checksum", "Verify", "AzureCredential", "CreateFolder".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl. As page blobs are used with this option we force the number of files to 1 and ignore any value passed in for BlockSize or MaxTransferSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>This is passed in to perform a tail log backup if needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BuildPath</maml:name><maml:description><maml:para>By default this command will not attempt to create missing paths, this switch will change the behaviour so that it will</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithFormat</maml:name><maml:description><maml:para>Formats the media as the first step of the backup operation. NOTE: This will set Initialize and SkipTapeHeader to $true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps backups using the format yyyyMMddHHmm. Using this parameter this can be overridden. The timestamp format should be defined using the Get-Date formats, illegal formats will cause an error to be thrown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreFileChecks</maml:name><maml:description><maml:para>This switch stops the function from checking for the validity of paths. This can be useful if SQL Server only has read access to the backup area. Note, that as we cannot check the path you may well end up with errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch causes only the T-SQL script for the backup to be generated. Will not create any paths if they do not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specified the Encryption Algorithm to used. Must be one of 'AES128','AES192','AES256' or 'TRIPLEDES' Must specify one of EncryptionCertificate or EncryptionKey as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionCertificate</maml:name><maml:description><maml:para>The name of the certificate to be used to encrypt the backups. The existence of the certificate will be checked, and will not proceed if it does not exist Is mutually exclusive with the EncryptionKey option</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The text describing the backup set like in BACKUP ... WITH DESCRITION = ''.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance hosting the databases to be backed up.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path in which to place the backup files. If not specified, the backups will be placed in the default backup location for SqlInstance. If multiple paths are specified, the backups will be striped across these locations. This will overwrite the FileCount option. If the path does not exist, Sql Server will attempt to create it. Folders are created by the Sql Instance, and checks will be made for write permissions. File Names with be suffixed with x-of-y to enable identifying striped sets, where y is the number of files in the set and x ranges from 1 to y.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The name of the file to backup to. This is only accepted for single database backups. If no name is specified then the backup files will be named DatabaseName_yyyyMMddHHmm (i.e. "Database1_201714022131") with the appropriate extension. If the same name is used repeatedly, SQL Server will add backups to the same file at an incrementing position. SQL Server needs permissions to write to the specified location. Path names are based on the SQL Server (C:\ is the C drive on the SQL Server, not the machine running the script). Passing in NUL as the FilePath will backup to the NUL: device</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementPrefix</maml:name><maml:description><maml:para>If enabled, this will prefix backup files with an incrementing integer (ie; '1-', '2-'). Using this has been alleged to improved restore times on some Azure based SQL Database platforms</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceInName</maml:name><maml:description><maml:para>If this switch is set, the following list of strings will be replaced in the FilePath and Path strings: instancename - will be replaced with the instance Name servername - will be replaced with the server name dbname - will be replaced with the database name timestamp - will be replaced with the timestamp (either the default, or the format provided) backuptype - will be replaced with Full, Log or Differential as appropriate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, CopyOnly backups will be taken. By default function performs a normal backup, these backups interfere with the restore chain of the database. CopyOnly backups will not interfere with the restore chain of the database. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of SQL Server backup to perform. Accepted values are "Full", "Log", "Differential", "Diff", "Database"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CreateFolder</maml:name><maml:description><maml:para>If this switch is enabled, each database will be backed up into a separate folder on each of the paths specified by Path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileCount</maml:name><maml:description><maml:para>This is the number of striped copies of the backups you wish to create. This value is overwritten if you specify multiple Backup Directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>If this switch is enabled, the function will try to perform a compressed backup if supported by the version and edition of SQL Server. Otherwise, this function will use the server(s) default setting for compression.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Checksum</maml:name><maml:description><maml:para>If this switch is enabled, the backup checksum will be calculated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Verify</maml:name><maml:description><maml:para>If this switch is enabled, the backup will be verified by running a RESTORE VERIFYONLY against the SqlInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Sets the size of the unit of transfer. Values must be a multiple of 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5KB, 1KB, 2KB, 4KB, 8KB, 16KB, 32KB or 64KB. This can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>The URL(s) to the base container of an Azure Storage account to write backups to. If specifying the AzureCredential parameter you can only provide 1 value as page blobs do not support multiple URLs If using Shared Access keys, you may specify as many URLs as you want, as long as a corresponding credential exists on the source server. If specified, the only other parameters than can be used are "CopyOnly", "Type", "CompressBackup", "Checksum", "Verify", "AzureCredential", "CreateFolder".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl. As page blobs are used with this option we force the number of files to 1 and ignore any value passed in for BlockSize or MaxTransferSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>This is passed in to perform a tail log backup if needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BuildPath</maml:name><maml:description><maml:para>By default this command will not attempt to create missing paths, this switch will change the behaviour so that it will</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithFormat</maml:name><maml:description><maml:para>Formats the media as the first step of the backup operation. NOTE: This will set Initialize and SkipTapeHeader to $true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps backups using the format yyyyMMddHHmm. Using this parameter this can be overridden. The timestamp format should be defined using the Get-Date formats, illegal formats will cause an error to be thrown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreFileChecks</maml:name><maml:description><maml:para>This switch stops the function from checking for the validity of paths. This can be useful if SQL Server only has read access to the backup area. Note, that as we cannot check the path you may well end up with errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch causes only the T-SQL script for the backup to be generated. Will not create any paths if they do not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specified the Encryption Algorithm to used. Must be one of 'AES128','AES192','AES256' or 'TRIPLEDES' Must specify one of EncryptionCertificate or EncryptionKey as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionCertificate</maml:name><maml:description><maml:para>The name of the certificate to be used to encrypt the backups. The existence of the certificate will be checked, and will not proceed if it does not exist Is mutually exclusive with the EncryptionKey option</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The text describing the backup set like in BACKUP ... WITH DESCRITION = ''.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path in which to place the backup files. If not specified, the backups will be placed in the default backup location for SqlInstance. If multiple paths are specified, the backups will be striped across these locations. This will overwrite the FileCount option. If the path does not exist, Sql Server will attempt to create it. Folders are created by the Sql Instance, and checks will be made for write permissions. File Names with be suffixed with x-of-y to enable identifying striped sets, where y is the number of files in the set and x ranges from 1 to y.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The name of the file to backup to. This is only accepted for single database backups. If no name is specified then the backup files will be named DatabaseName_yyyyMMddHHmm (i.e. "Database1_201714022131") with the appropriate extension. If the same name is used repeatedly, SQL Server will add backups to the same file at an incrementing position. SQL Server needs permissions to write to the specified location. Path names are based on the SQL Server (C:\ is the C drive on the SQL Server, not the machine running the script). Passing in NUL as the FilePath will backup to the NUL: device</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementPrefix</maml:name><maml:description><maml:para>If enabled, this will prefix backup files with an incrementing integer (ie; '1-', '2-'). Using this has been alleged to improved restore times on some Azure based SQL Database platforms</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceInName</maml:name><maml:description><maml:para>If this switch is set, the following list of strings will be replaced in the FilePath and Path strings: instancename - will be replaced with the instance Name servername - will be replaced with the server name dbname - will be replaced with the database name timestamp - will be replaced with the timestamp (either the default, or the format provided) backuptype - will be replaced with Full, Log or Differential as appropriate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, CopyOnly backups will be taken. By default function performs a normal backup, these backups interfere with the restore chain of the database. CopyOnly backups will not interfere with the restore chain of the database. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of SQL Server backup to perform. Accepted values are "Full", "Log", "Differential", "Diff", "Database"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CreateFolder</maml:name><maml:description><maml:para>If this switch is enabled, each database will be backed up into a separate folder on each of the paths specified by Path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileCount</maml:name><maml:description><maml:para>This is the number of striped copies of the backups you wish to create. This value is overwritten if you specify multiple Backup Directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>If this switch is enabled, the function will try to perform a compressed backup if supported by the version and edition of SQL Server. Otherwise, this function will use the server(s) default setting for compression.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Checksum</maml:name><maml:description><maml:para>If this switch is enabled, the backup checksum will be calculated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Verify</maml:name><maml:description><maml:para>If this switch is enabled, the backup will be verified by running a RESTORE VERIFYONLY against the SqlInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Sets the size of the unit of transfer. Values must be a multiple of 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5KB, 1KB, 2KB, 4KB, 8KB, 16KB, 32KB or 64KB. This can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>The URL(s) to the base container of an Azure Storage account to write backups to. If specifying the AzureCredential parameter you can only provide 1 value as page blobs do not support multiple URLs If using Shared Access keys, you may specify as many URLs as you want, as long as a corresponding credential exists on the source server. If specified, the only other parameters than can be used are "CopyOnly", "Type", "CompressBackup", "Checksum", "Verify", "AzureCredential", "CreateFolder".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl. As page blobs are used with this option we force the number of files to 1 and ignore any value passed in for BlockSize or MaxTransferSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>This is passed in to perform a tail log backup if needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BuildPath</maml:name><maml:description><maml:para>By default this command will not attempt to create missing paths, this switch will change the behaviour so that it will</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithFormat</maml:name><maml:description><maml:para>Formats the media as the first step of the backup operation. NOTE: This will set Initialize and SkipTapeHeader to $true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps backups using the format yyyyMMddHHmm. Using this parameter this can be overridden. The timestamp format should be defined using the Get-Date formats, illegal formats will cause an error to be thrown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreFileChecks</maml:name><maml:description><maml:para>This switch stops the function from checking for the validity of paths. This can be useful if SQL Server only has read access to the backup area. Note, that as we cannot check the path you may well end up with errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch causes only the T-SQL script for the backup to be generated. Will not create any paths if they do not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specified the Encryption Algorithm to used. Must be one of 'AES128','AES192','AES256' or 'TRIPLEDES' Must specify one of EncryptionCertificate or EncryptionKey as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionCertificate</maml:name><maml:description><maml:para>The name of the certificate to be used to encrypt the backups. The existence of the certificate will be checked, and will not proceed if it does not exist Is mutually exclusive with the EncryptionKey option</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The text describing the backup set like in BACKUP ... WITH DESCRITION = ''.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>The URL(s) to the base container of an Azure Storage account to write backups to. If specifying the AzureCredential parameter you can only provide 1 value as page blobs do not support multiple URLs If using Shared Access keys, you may specify as many URLs as you want, as long as a corresponding credential exists on the source server. If specified, the only other parameters than can be used are "CopyOnly", "Type", "CompressBackup", "Checksum", "Verify", "AzureCredential", "CreateFolder".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl. As page blobs are used with this option we force the number of files to 1 and ignore any value passed in for BlockSize or MaxTransferSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5KB, 1KB, 2KB, 4KB, 8KB, 16KB, 32KB or 64KB. This can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BuildPath</maml:name><maml:description><maml:para>By default this command will not attempt to create missing paths, this switch will change the behaviour so that it will</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Checksum</maml:name><maml:description><maml:para>If this switch is enabled, the backup checksum will be calculated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>If this switch is enabled, the function will try to perform a compressed backup if supported by the version and edition of SQL Server. Otherwise, this function will use the server(s) default setting for compression.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, CopyOnly backups will be taken. By default function performs a normal backup, these backups interfere with the restore chain of the database. CopyOnly backups will not interfere with the restore chain of the database. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CreateFolder</maml:name><maml:description><maml:para>If this switch is enabled, each database will be backed up into a separate folder on each of the paths specified by Path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The text describing the backup set like in BACKUP ... WITH DESCRITION = ''.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specified the Encryption Algorithm to used. Must be one of 'AES128','AES192','AES256' or 'TRIPLEDES' Must specify one of EncryptionCertificate or EncryptionKey as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionCertificate</maml:name><maml:description><maml:para>The name of the certificate to be used to encrypt the backups. The existence of the certificate will be checked, and will not proceed if it does not exist Is mutually exclusive with the EncryptionKey option</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileCount</maml:name><maml:description><maml:para>This is the number of striped copies of the backups you wish to create. This value is overwritten if you specify multiple Backup Directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The name of the file to backup to. This is only accepted for single database backups. If no name is specified then the backup files will be named DatabaseName_yyyyMMddHHmm (i.e. "Database1_201714022131") with the appropriate extension. If the same name is used repeatedly, SQL Server will add backups to the same file at an incrementing position. SQL Server needs permissions to write to the specified location. Path names are based on the SQL Server (C:\ is the C drive on the SQL Server, not the machine running the script). Passing in NUL as the FilePath will backup to the NUL: device</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreFileChecks</maml:name><maml:description><maml:para>This switch stops the function from checking for the validity of paths. This can be useful if SQL Server only has read access to the backup area. Note, that as we cannot check the path you may well end up with errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementPrefix</maml:name><maml:description><maml:para>If enabled, this will prefix backup files with an incrementing integer (ie; '1-', '2-'). Using this has been alleged to improved restore times on some Azure based SQL Database platforms</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Initialize</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Sets the size of the unit of transfer. Values must be a multiple of 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>This is passed in to perform a tail log backup if needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch causes only the T-SQL script for the backup to be generated. Will not create any paths if they do not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path in which to place the backup files. If not specified, the backups will be placed in the default backup location for SqlInstance. If multiple paths are specified, the backups will be striped across these locations. This will overwrite the FileCount option. If the path does not exist, Sql Server will attempt to create it. Folders are created by the Sql Instance, and checks will be made for write permissions. File Names with be suffixed with x-of-y to enable identifying striped sets, where y is the number of files in the set and x ranges from 1 to y.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceInName</maml:name><maml:description><maml:para>If this switch is set, the following list of strings will be replaced in the FilePath and Path strings: instancename - will be replaced with the instance Name servername - will be replaced with the server name dbname - will be replaced with the database name timestamp - will be replaced with the timestamp (either the default, or the format provided) backuptype - will be replaced with Full, Log or Differential as appropriate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Initializes the media as part of the backup operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance hosting the databases to be backed up.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps backups using the format yyyyMMddHHmm. Using this parameter this can be overridden. The timestamp format should be defined using the Get-Date formats, illegal formats will cause an error to be thrown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of SQL Server backup to perform. Accepted values are "Full", "Log", "Differential", "Diff", "Database"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Verify</maml:name><maml:description><maml:para>If this switch is enabled, the backup will be verified by running a RESTORE VERIFYONLY against the SqlInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithFormat</maml:name><maml:description><maml:para>Formats the media as the first step of the backup operation. NOTE: This will set Initialize and SkipTapeHeader to $true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Server1 -Database HR, Finance </dev:code><dev:remarks><maml:para> This will perform a full database backup on the databases HR and Finance on SQL Server Instance Server1 to Server1 default backup directory. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance sql2016 -Path C:\temp -Database AdventureWorks2014 -Type Full </dev:code><dev:remarks><maml:para> Backs up AdventureWorks2014 to sql2016 C:\temp folder. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance sql2016 -AzureBaseUrl https://dbatoolsaz.blob.core.windows.net/azbackups/ -AzureCredential dbatoolscred -Type Full -CreateFolder </dev:code><dev:remarks><maml:para> Performs 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 blob storage using the sql credential "dbatoolscred" registered on the sql2016 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance sql2016 -AzureBaseUrl https://dbatoolsaz.blob.core.windows.net/azbackups/ -Type Full </dev:code><dev:remarks><maml:para> Performs a full backup of all databases on the sql2016 instance to the https://dbatoolsaz.blob.core.windows.net/azbackups/ container on Azure blob storage using the Shared Access Signature sql credential "https://dbatoolsaz.blob.core.windows.net/azbackups" registered on the sql2016 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Server1\Prod -Database db1 -Path \\filestore\backups\servername\instancename\dbname\backuptype -Type Full -ReplaceInName </dev:code><dev:remarks><maml:para> Performs a full backup of db1 into the folder \\filestore\backups\server1\prod\db1\Full </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Server1\Prod -Path \\filestore\backups\servername\instancename\dbname\backuptype -FilePath dbname-backuptype-timestamp.trn -Type Log -ReplaceInName </dev:code><dev:remarks><maml:para> Performs a log backup for every database. For the database db1 this would results in backup files in \\filestore\backups\server1\prod\db1\Log\db1-log-31102018.trn </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Sql2017 -Database master -FilePath NUL </dev:code><dev:remarks><maml:para> Performs a backup of master, but sends the output to the NUL device (ie; throws it away) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Sql2016 -Database stripetest -AzureBaseUrl https://az.blob.core.windows.net/sql,https://dbatools.blob.core.windows.net/sql </dev:code><dev:remarks><maml:para> Performs a backup of the database stripetest, striping it across the 2 Azure blob containers at https://az.blob.core.windows.net/sql and https://dbatools.blob.core.windows.net/sql, assuming that Shared Access Signature credentials for both containers exist on the source instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDatabase -SqlInstance Sql2017 -Database master -EncryptionAlgorithm AES256 -EncryptionCertificate BackupCert </dev:code><dev:remarks><maml:para> Backs up the master database using the BackupCert certificate and the AES256 algorithm. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Backup-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Backup-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Exports database certificates from SQL Server using SMO.</maml:para></maml:description></command:details><maml:description><maml:para>Exports database certificates from SQL Server using SMO and outputs the .cer and .pvk files.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-DbaDbCertificate</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to output the files to. The path is relative to the SQL Server itself. If no path is specified, the default data directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>The suffix of the filename of the exported certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-DbaDbCertificate</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Exports certificate that matches the name(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Exports the encryptor for specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to skip when exporting encryptors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to output the files to. The path is relative to the SQL Server itself. If no path is specified, the default data directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>The suffix of the filename of the exported certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-DbaDbCertificate</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to output the files to. The path is relative to the SQL Server itself. If no path is specified, the default data directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>The suffix of the filename of the exported certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDbCertificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Certificate[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Certificate[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Exports certificate that matches the name(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Exports the encryptor for specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to skip when exporting encryptors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDbCertificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Certificate[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Certificate[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to output the files to. The path is relative to the SQL Server itself. If no path is specified, the default data directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>The suffix of the filename of the exported certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CertBackup, Certificate, Backup Author: Jess Pomfret (@jpomfret) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 </dev:code><dev:remarks><maml:para> Exports all the certificates on the specified SQL Server to the default data path for the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Backup-DbaDbCertificate -SqlInstance Server1 -SqlCredential $cred Connects using sqladmin credential and exports all the certificates on the specified SQL Server to the default data path for the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Certificate Certificate1 </dev:code><dev:remarks><maml:para> Exports only the certificate named Certificate1 on the specified SQL Server to the default data path for the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Database AdventureWorks </dev:code><dev:remarks><maml:para> Exports only the certificates for AdventureWorks on the specified SQL Server to the default data path for the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -ExcludeDatabase AdventureWorks </dev:code><dev:remarks><maml:para> Exports all certificates except those for AdventureWorks on the specified SQL Server to the default data path for the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates -EncryptionPassword (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> Exports all the certificates and private keys on the specified SQL Server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $EncryptionPassword = (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> PS C:\> $DecryptionPassword = (Get-Credential NoUsernameNeeded).Password PS C:\> Backup-DbaDbCertificate -SqlInstance Server1 -EncryptionPassword $EncryptionPassword -DecryptionPassword $DecryptionPassword Exports all the certificates on the specified SQL Server using the supplied DecryptionPassword, since an EncryptionPassword is specified private keys are also exported. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates </dev:code><dev:remarks><maml:para> Exports all certificates on the specified SQL Server to the specified path. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Suffix DbaTools </dev:code><dev:remarks><maml:para> Exports all certificates on the specified SQL Server to the specified path, appends DbaTools to the end of the filenames. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance sql2016 | Backup-DbaDbCertificate </dev:code><dev:remarks><maml:para> Exports all certificates found on sql2016 to the default data directory. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Backup-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Backup-DbaDbMasterKey</command:name><command:noun>DbaDbMasterKey</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Backs up specified database master key.</maml:para></maml:description></command:details><maml:description><maml:para>Backs up specified database master key.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-DbaDbMasterKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Pass a credential object for the password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Backup master key from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to export the key. If no path is specified, the default backup directory for the instance will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Pass a credential object for the password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Backup master key from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to export the key. If no path is specified, the default backup directory for the instance will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CertBackup, Certificate, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbMasterKey -SqlInstance server1\sql2016 </dev:code><dev:remarks><maml:para> >> ComputerName : SERVER1 >> InstanceName : SQL2016 >> SqlInstance : SERVER1\SQL2016 >> Filename : E:\MSSQL13.SQL2016\MSSQL\Backup\server1$sql2016-SMK-20170614162311.key >> Status : Success Prompts for export password, then logs into server1\sql2016 with Windows credentials then backs up all database keys to the default backup directory. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaDbMasterKey -SqlInstance Server1 -Database db1 -Path \\nas\sqlbackups\keys </dev:code><dev:remarks><maml:para> Logs into sql2016 with Windows credentials then backs up db1's keys to the \\nas\sqlbackups\keys directory. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Backup-DbaDbMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Backup-DbaServiceMasterKey</command:name><command:noun>DbaServiceMasterKey</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Backs up specified service master key.</maml:para></maml:description></command:details><maml:description><maml:para>Backs up specified service master key.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-DbaServiceMasterKey</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyCredential</maml:name><maml:description><maml:para>Pass a credential object for the password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to export the key. If no path is specified, the default backup directory for the instance will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyCredential</maml:name><maml:description><maml:para>Pass a credential object for the password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to export the key. If no path is specified, the default backup directory for the instance will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CertBackup, Certificate, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaServiceMasterKey -SqlInstance server1\sql2016 </dev:code><dev:remarks><maml:para> >> ComputerName : SERVER1 >> InstanceName : SQL2016 >> SqlInstance : SERVER1\SQL2016 >> Filename : E:\MSSQL13.SQL2016\MSSQL\Backup\server1$sql2016-SMK-20170614162311.key >> Status : Success Prompts for export password, then logs into server1\sql2016 with Windows credentials then backs up the service master key to the default backup directory. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Backup-DbaServiceMasterKey -SqlInstance Server1 -Path \\nas\sqlbackups\keys </dev:code><dev:remarks><maml:para> Logs into sql2016 with Windows credentials then backs up the service master key to the \\nas\sqlbackups\keys directory. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Backup-DbaServiceMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Clear-DbaConnectionPool</command:name><command:noun>DbaConnectionPool</command:noun><command:verb>Clear</command:verb><maml:description><maml:para>Resets (or empties) the connection pool.</maml:para></maml:description></command:details><maml:description><maml:para>This command resets (or empties) the connection pool.</maml:para><maml:para>If 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.</maml:para><maml:para>Ref: https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools(v=vs.110).aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Clear-DbaConnectionPool</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaConnectionPool </dev:code><dev:remarks><maml:para> Clears all local connection pools. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaConnectionPool -ComputerName workstation27 </dev:code><dev:remarks><maml:para> Clears all connection pools on workstation27. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Clear-DbaConnectionPool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Clear-DbaLatchStatistics</command:name><command:noun>DbaLatchStatistics</command:noun><command:verb>Clear</command:verb><maml:description><maml:para>Clears Latch Statistics</maml:para></maml:description></command:details><maml:description><maml:para>Reset the aggregated statistics - basically just executes DBCC SQLPERF (N'sys.dm_os_latch_stats', CLEAR)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Clear-DbaLatchStatistics</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, LatchStatistic, Waits Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaLatchStatistics -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> After confirmation, clears latch statistics on servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaLatchStatistics -SqlInstance sql2008, sqlserver2012 -Confirm:$false </dev:code><dev:remarks><maml:para> Clears latch statistics on servers sql2008 and sqlserver2012, without prompting </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008','sqlserver2012' | Clear-DbaLatchStatistics </dev:code><dev:remarks><maml:para> After confirmation, clears latch statistics on servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Clear-DbaLatchStatistics -SqlInstance sql2008 -SqlCredential $cred Connects using sqladmin credential and clears latch statistics on servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Clear-DbaLatchStatistics</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Clear-DbaPlanCache</command:name><command:noun>DbaPlanCache</command:noun><command:verb>Clear</command:verb><maml:description><maml:para>Removes ad-hoc and prepared plan caches is single use plans are over defined threshold.</maml:para></maml:description></command:details><maml:description><maml:para>Checks ad-hoc and prepared plan cache for each database, if over 100 MBs removes from the cache.</maml:para><maml:para>This command automates that process.</maml:para><maml:para>References: https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Clear-DbaPlanCache</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Memory used threshold.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables results to be piped in from Get-DbaPlanCache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables results to be piped in from Get-DbaPlanCache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Memory used threshold.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Memory Author: Tracy Boggiano, databasesuperhero.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaPlanCache -SqlInstance sql2017 -Threshold 200 </dev:code><dev:remarks><maml:para> Logs into the SQL Server instance "sql2017" and removes plan caches if over 200 MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaPlanCache -SqlInstance sql2017 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Logs into the SQL instance using the SQL Login 'sqladmin' and then Windows instance as 'ad\sqldba' and removes if Threshold over 100 MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaInstance -ComputerName localhost | Get-DbaPlanCache | Clear-DbaPlanCache -Threshold 200 </dev:code><dev:remarks><maml:para> Scans 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Clear-DbaPlanCache</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Clear-DbaWaitStatistics</command:name><command:noun>DbaWaitStatistics</command:noun><command:verb>Clear</command:verb><maml:description><maml:para>Clears wait statistics</maml:para></maml:description></command:details><maml:description><maml:para>Reset the aggregated statistics - basically just executes DBCC SQLPERF (N'sys.dm_os_wait_stats', CLEAR)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Clear-DbaWaitStatistics</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, WaitStats, Waits Author: Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaWaitStatistics -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> After confirmation, clears wait stats on servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Clear-DbaWaitStatistics -SqlInstance sql2008, sqlserver2012 -Confirm:$false </dev:code><dev:remarks><maml:para> Clears wait stats on servers sql2008 and sqlserver2012, without prompting </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Clear-DbaWaitStatistics</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Connect-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Connect</command:verb><maml:description><maml:para>Creates a robust, reusable SQL Server object.</maml:para></maml:description></command:details><maml:description><maml:para>This command creates a robust, reusable sql server object.</maml:para><maml:para>It 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.</maml:para><maml:para>By default, this command also sets the connection's ApplicationName property to "dbatools PowerShell module - dbatools.io - custom connection". If you're doing anything that requires profiling, you can look for this client name.</maml:para><maml:para>Alternatively, you can pass in whichever client name you'd like using the -ClientName parameter. There are a ton of other parameters for you to explore as well.</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx</maml:para><maml:para>and https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx,</maml:para><maml:para>and https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx</maml:para><maml:para>To execute SQL commands, you can use $server.ConnectionContext.ExecuteReader($sql) or $server.Databases['master'].ExecuteNonQuery($sql)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Connect-DbaInstance</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationIntent</maml:name><maml:description><maml:para>Declares the application workload type when connecting to a server. Valid values are "ReadOnly" and "ReadWrite".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureUnsupported</maml:name><maml:description><maml:para>Terminate if Azure is detected but not supported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>A string to separate groups of SQL statements being executed. By default, this is "GO".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClientName</maml:name><maml:description><maml:para>By default, this command sets the client's ApplicationName property to "dbatools PowerShell module - dbatools.io". If you're doing anything that requires profiling, you can look for this client name. Using -ClientName allows you to set your own custom client application name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectTimeout</maml:name><maml:description><maml:para>The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. Valid values are integers between 0 and 2147483647. When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptConnection</maml:name><maml:description><maml:para>If this switch is enabled, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. For more information, see Connection String Syntax. https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax Beginning in .NET Framework 4.5, when TrustServerCertificate is false and Encrypt is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see Accepted wildcards used by server certificates for server authentication. https://support.microsoft.com/en-us/help/258858/accepted-wildcards-used-by-server-certificates-for-server-authenticati</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverPartner</maml:name><maml:description><maml:para>The name of the failover partner server where database mirroring is configured. If the value of this key is "" (an empty string), then Initial Catalog must be present in the connection string, and its value must not be "". The server name can be 128 characters or less. If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail. If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockTimeout</maml:name><maml:description><maml:para>Sets the time in seconds required for the connection to time out when the current transaction is locked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPoolSize</maml:name><maml:description><maml:para>Sets the maximum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinPoolSize</maml:name><maml:description><maml:para>Sets the minimum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumVersion</maml:name><maml:description><maml:para>Terminate if the target SQL Server instance version does not meet version requirements</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>If this switch is enabled, an application can maintain multiple active result sets (MARS). If this switch is not enabled, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiSubnetFailover</maml:name><maml:description><maml:para>If this switch is enabled, and your application is connecting to an AlwaysOn availability group (AG) on different subnets, detection of and connection to the currently active server will be faster. For more information about SqlClient support for Always On Availability Groups, see https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetworkProtocol</maml:name><maml:description><maml:para>Explicitly sets the network protocol used to connect to the server. Valid values are "TcpIp","NamedPipes","Multiprotocol","AppleTalk","BanyanVines","Via","SharedMemory" and "NWLinkIpxSpx"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>If this switch is enabled, a non-pooled connection will be requested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PacketSize</maml:name><maml:description><maml:para>Sets the size in bytes of the network packets used to communicate with an instance of SQL Server. Must match at server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PooledConnectionLifetime</maml:name><maml:description><maml:para>When a connection is returned to the pool, its creation time is compared with the current time and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) causes pooled connections to have the maximum connection timeout.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlExecutionModes</maml:name><maml:description><maml:para>The SqlExecutionModes enumeration contains values that are used to specify whether the commands sent to the referenced connection to the server are executed immediately or saved in a buffer. Valid values include "CaptureSql", "ExecuteAndCaptureSql" and "ExecuteSql".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Sets the number of seconds a statement is given to run before failing with a timeout error. The default is read from the configuration 'sql.execution.timeout' that is currently set to 0 (unlimited). If you want to change this to 10 minutes, use: Set-DbatoolsConfig -FullName 'sql.execution.timeout' -Value 600</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustServerCertificate</maml:name><maml:description><maml:para>When this switch is enabled, the channel will be encrypted while bypassing walking the certificate chain to validate trust.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Sets the name of the workstation connecting to SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AlwaysEncrypted</maml:name><maml:description><maml:para>Sets "Column Encryption Setting=enabled" on the connection so you can work with Always Encrypted values. For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/develop-using-always-encrypted-with-net-framework-data-provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendConnectionString</maml:name><maml:description><maml:para>Appends to the current connection string. Note that you cannot pass authentication information using this method. Use -SqlInstance and optionally -SqlCredential to set authentication information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlConnectionOnly</maml:name><maml:description><maml:para>Instead of returning a rich SMO server object, this command will only return a SqlConnection object when setting this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureDomain</maml:name><maml:description><maml:para>By default, this is set to database.windows.net In the event your AzureSqlDb is not on a database.windows.net domain, you can set a custom domain using the AzureDomain parameter. This tells Connect-DbaInstance to login to the database using the method that works best with Azure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tenant</maml:name><maml:description><maml:para>The TenantId for an Azure Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccessToken</maml:name><maml:description><maml:para>Connect to an Azure SQL Database or an Azure SQL Managed Instance with an AccessToken, that has to be generated with Get-AzAccessToken or New-DbaAzAccessToken. Note that the token is valid for only one hour and cannot be renewed automatically.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DedicatedAdminConnection</maml:name><maml:description><maml:para>Connects using "ADMIN:" to create a dedicated admin connection (DAC) as a non-pooled connection. If the instance is on a remote server, the remote access has to be enabled via "Set-DbaSpConfigure -Name RemoteDacConnectionsEnabled -Value $true" or "sp_configure 'remote admin connections', 1". The connection will not be closed if the variable holding the Server SMO is going out of scope, so it is very important to call .ConnectionContext.Disconnect() to close the connection. See example.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccessToken</maml:name><maml:description><maml:para>Connect to an Azure SQL Database or an Azure SQL Managed Instance with an AccessToken, that has to be generated with Get-AzAccessToken or New-DbaAzAccessToken. Note that the token is valid for only one hour and cannot be renewed automatically.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AlwaysEncrypted</maml:name><maml:description><maml:para>Sets "Column Encryption Setting=enabled" on the connection so you can work with Always Encrypted values. For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/develop-using-always-encrypted-with-net-framework-data-provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendConnectionString</maml:name><maml:description><maml:para>Appends to the current connection string. Note that you cannot pass authentication information using this method. Use -SqlInstance and optionally -SqlCredential to set authentication information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationIntent</maml:name><maml:description><maml:para>Declares the application workload type when connecting to a server. Valid values are "ReadOnly" and "ReadWrite".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureDomain</maml:name><maml:description><maml:para>By default, this is set to database.windows.net In the event your AzureSqlDb is not on a database.windows.net domain, you can set a custom domain using the AzureDomain parameter. This tells Connect-DbaInstance to login to the database using the method that works best with Azure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureUnsupported</maml:name><maml:description><maml:para>Terminate if Azure is detected but not supported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>A string to separate groups of SQL statements being executed. By default, this is "GO".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClientName</maml:name><maml:description><maml:para>By default, this command sets the client's ApplicationName property to "dbatools PowerShell module - dbatools.io". If you're doing anything that requires profiling, you can look for this client name. Using -ClientName allows you to set your own custom client application name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectTimeout</maml:name><maml:description><maml:para>The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. Valid values are integers between 0 and 2147483647. When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DedicatedAdminConnection</maml:name><maml:description><maml:para>Connects using "ADMIN:" to create a dedicated admin connection (DAC) as a non-pooled connection. If the instance is on a remote server, the remote access has to be enabled via "Set-DbaSpConfigure -Name RemoteDacConnectionsEnabled -Value $true" or "sp_configure 'remote admin connections', 1". The connection will not be closed if the variable holding the Server SMO is going out of scope, so it is very important to call .ConnectionContext.Disconnect() to close the connection. See example.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptConnection</maml:name><maml:description><maml:para>If this switch is enabled, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. For more information, see Connection String Syntax. https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax Beginning in .NET Framework 4.5, when TrustServerCertificate is false and Encrypt is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see Accepted wildcards used by server certificates for server authentication. https://support.microsoft.com/en-us/help/258858/accepted-wildcards-used-by-server-certificates-for-server-authenticati</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverPartner</maml:name><maml:description><maml:para>The name of the failover partner server where database mirroring is configured. If the value of this key is "" (an empty string), then Initial Catalog must be present in the connection string, and its value must not be "". The server name can be 128 characters or less. If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail. If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockTimeout</maml:name><maml:description><maml:para>Sets the time in seconds required for the connection to time out when the current transaction is locked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPoolSize</maml:name><maml:description><maml:para>Sets the maximum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumVersion</maml:name><maml:description><maml:para>Terminate if the target SQL Server instance version does not meet version requirements</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinPoolSize</maml:name><maml:description><maml:para>Sets the minimum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>If this switch is enabled, an application can maintain multiple active result sets (MARS). If this switch is not enabled, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiSubnetFailover</maml:name><maml:description><maml:para>If this switch is enabled, and your application is connecting to an AlwaysOn availability group (AG) on different subnets, detection of and connection to the currently active server will be faster. For more information about SqlClient support for Always On Availability Groups, see https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetworkProtocol</maml:name><maml:description><maml:para>Explicitly sets the network protocol used to connect to the server. Valid values are "TcpIp","NamedPipes","Multiprotocol","AppleTalk","BanyanVines","Via","SharedMemory" and "NWLinkIpxSpx"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>If this switch is enabled, a non-pooled connection will be requested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PacketSize</maml:name><maml:description><maml:para>Sets the size in bytes of the network packets used to communicate with an instance of SQL Server. Must match at server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PooledConnectionLifetime</maml:name><maml:description><maml:para>When a connection is returned to the pool, its creation time is compared with the current time and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) causes pooled connections to have the maximum connection timeout.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlConnectionOnly</maml:name><maml:description><maml:para>Instead of returning a rich SMO server object, this command will only return a SqlConnection object when setting this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlExecutionModes</maml:name><maml:description><maml:para>The SqlExecutionModes enumeration contains values that are used to specify whether the commands sent to the referenced connection to the server are executed immediately or saved in a buffer. Valid values include "CaptureSql", "ExecuteAndCaptureSql" and "ExecuteSql".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Sets the number of seconds a statement is given to run before failing with a timeout error. The default is read from the configuration 'sql.execution.timeout' that is currently set to 0 (unlimited). If you want to change this to 10 minutes, use: Set-DbatoolsConfig -FullName 'sql.execution.timeout' -Value 600</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tenant</maml:name><maml:description><maml:para>The TenantId for an Azure Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustServerCertificate</maml:name><maml:description><maml:para>When this switch is enabled, the channel will be encrypted while bypassing walking the certificate chain to validate trust.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Sets the name of the workstation connecting to SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Connect-DbaInstance -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> Creates an SMO Server object that connects using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Connect-DbaInstance -SqlInstance sql2014 -SqlCredential $wincred Creates an SMO Server object that connects using alternative Windows credentials </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $sqlcred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> $server = Connect-DbaInstance -SqlInstance sql2014 -SqlCredential $sqlcred Login to sql2014 as SQL login sqladmin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance sql2014 -ClientName "my connection" </dev:code><dev:remarks><maml:para> Creates 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 connection". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance sql2014 -AppendConnectionString "Packet Size=4096;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;User Instance=true;" </dev:code><dev:remarks><maml:para> Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance sql2014 -NetworkProtocol TcpIp -MultiSubnetFailover </dev:code><dev:remarks><maml:para> Creates an SMO Server object that connects using Windows Authentication that uses TCP/IP and has MultiSubnetFailover enabled. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance sql2016 -ApplicationIntent ReadOnly </dev:code><dev:remarks><maml:para> Connects with ReadOnly ApplicationIntent. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance myserver.database.windows.net -Database mydb -SqlCredential me@mydomain.onmicrosoft.com -DisableException </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Logs into Azure SQL DB using AAD / Azure Active Directory, then performs a sample query. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database dbatools -DisableException </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Logs into Azure SQL DB using AAD Integrated Auth, then performs a sample query. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance "myserver.public.cust123.database.windows.net,3342" -Database mydb -SqlCredential me@mydomain.onmicrosoft.com -DisableException </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Logs into Azure SQL Managed instance using AAD / Azure Active Directory, then performs a sample query. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance db.mycustomazure.com -Database mydb -AzureDomain mycustomazure.com -DisableException </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" In the event your AzureSqlDb is not on a database.windows.net domain, you can set a custom domain using the AzureDomain parameter. This tells Connect-DbaInstance to login to the database using the method that works best with Azure. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $connstring = "Data Source=TCP:mydb.database.windows.net,1433;User ID=sqladmin;Password=adfasdf;Connect Timeout=30;" </dev:code><dev:remarks><maml:para> PS C:\> $server = Connect-DbaInstance -ConnectionString $connstring PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Logs into Azure using a preconstructed connstring, then performs a sample query. ConnectionString is an alias of SqlInstance, so you can use -SqlInstance $connstring as well. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 13 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential guid-app-id-here # appid for username, clientsecret for password </dev:code><dev:remarks><maml:para> PS C:\> $server = Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -SqlCredential $cred -Tenant guidheremaybename PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" When connecting from a non-Azure workstation, logs into Azure using Universal with MFA Support with a username and password, then performs a sample query. Note that generating access tokens is not supported on Core, so when using Tenant on Core, we rewrite the connection string with Active Directory Service Principal authentication instead. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential guid-app-id-here # appid for username, clientsecret for password </dev:code><dev:remarks><maml:para> PS C:\> Set-DbatoolsConfig -FullName azure.tenantid -Value 'guidheremaybename' -Passthru | Register-DbatoolsConfig PS C:\> Set-DbatoolsConfig -FullName azure.appid -Value $cred.Username -Passthru | Register-DbatoolsConfig PS C:\> Set-DbatoolsConfig -FullName azure.clientsecret -Value $cred.Password -Passthru | Register-DbatoolsConfig # requires securestring PS C:\> Set-DbatoolsConfig -FullName sql.connection.database -Value abc -Passthru | Register-DbatoolsConfig PS C:\> Connect-DbaInstance -SqlInstance psdbatools.database.windows.net Permanently sets some app id config values. To set them temporarily (just for a session), remove -Passthru | Register-DbatoolsConfig When connecting from a non-Azure workstation or an Azure VM without .NET 4.7.2 and higher, logs into Azure using Universal with MFA Support, then performs a sample query. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 15 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $azureCredential = Get-Credential -Message 'Azure Credential' </dev:code><dev:remarks><maml:para> PS C:\> $azureAccount = Connect-AzAccount -Credential $azureCredential PS C:\> $azureToken = Get-AzAccessToken -ResourceUrl https://database.windows.net PS C:\> $azureInstance = "YOURSERVER.database.windows.net" PS C:\> $azureDatabase = "MYDATABASE" PS C:\> $server = Connect-DbaInstance -SqlInstance $azureInstance -Database $azureDatabase -AccessToken $azureToken PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Connect to an Azure SQL Database or an Azure SQL Managed Instance with an AccessToken. Note that the token is valid for only one hour and cannot be renewed automatically. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 16 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $token = New-DbaAzAccessToken -Type RenewableServicePrincipal -Subtype AzureSqlDb -Tenant $tenantid -Credential $cred </dev:code><dev:remarks><maml:para> PS C:\> Connect-DbaInstance -SqlInstance sample.database.windows.net -Accesstoken $token Uses dbatools to generate the access token for an Azure SQL Database, then logs in using that AccessToken. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 17 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance srv1 -DedicatedAdminConnection </dev:code><dev:remarks><maml:para> PS C:\> $dbaProcess = Get-DbaProcess -SqlInstance $server -ExcludeSystemSpids PS C:\> $killedProcess = $dbaProcess | Out-GridView -OutputMode Multiple | Stop-DbaProcess PS C:\> $server | Disconnect-DbaInstance Creates a dedicated admin connection (DAC) to the default instance on server srv1. Receives all non-system processes from the instance using the DAC. Opens a grid view to let the user select processes to be stopped. Closes the connection. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Connect-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>ConvertTo-DbaDataTable</command:name><command:noun>DbaDataTable</command:noun><command:verb>ConvertTo</command:verb><maml:description><maml:para>Creates a DataTable for an object.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a DataTable based on an object's properties. This allows you to easily write to SQL Server tables.</maml:para><maml:para>Thanks to Chad Miller, this is based on his script. https://gallery.technet.microsoft.com/scriptcenter/4208a159-a52e-4b99-83d4-8048468d29dd</maml:para><maml:para>If the attempt to convert to data table fails, try the -Raw parameter for less accurate datatype detection.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>ConvertTo-DbaDataTable</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object to transform into a DataTable.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeSpanType</maml:name><maml:description><maml:para>Specifies the type to convert TimeSpan objects into. Default is 'TotalMilliseconds'. Valid options are: 'Ticks', 'TotalDays', 'TotalHours', 'TotalMinutes', 'TotalSeconds', 'TotalMilliseconds', and 'String'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SizeType</maml:name><maml:description><maml:para>Specifies the type to convert DbaSize objects to. Default is 'Int64'. Valid options are 'Int32', 'Int64', and 'String'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreNull</maml:name><maml:description><maml:para>If this switch is enabled, objects with null values will be ignored (empty rows will be added by default).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the DataTable will be created with strings. No attempt will be made to parse/determine data types.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreNull</maml:name><maml:description><maml:para>If this switch is enabled, objects with null values will be ignored (empty rows will be added by default).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The object to transform into a DataTable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the DataTable will be created with strings. No attempt will be made to parse/determine data types.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SizeType</maml:name><maml:description><maml:para>Specifies the type to convert DbaSize objects to. Default is 'Int64'. Valid options are 'Int32', 'Int64', and 'String'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeSpanType</maml:name><maml:description><maml:para>Specifies the type to convert TimeSpan objects into. Default is 'TotalMilliseconds'. Valid options are: 'Ticks', 'TotalDays', 'TotalHours', 'TotalMinutes', 'TotalSeconds', 'TotalMilliseconds', and 'String'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io/ Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Service | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Creates a DataTable from the output of Get-Service. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> ConvertTo-DbaDataTable -InputObject $csv.cheesetypes </dev:code><dev:remarks><maml:para> Creates a DataTable from the CSV object $csv.cheesetypes. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $dblist | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Creates a DataTable from the $dblist object passed in via pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Process | ConvertTo-DbaDataTable -TimeSpanType TotalSeconds </dev:code><dev:remarks><maml:para> Creates a DataTable with the running processes and converts any TimeSpan property to TotalSeconds. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/ConvertTo-DbaDataTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>ConvertTo-DbaTimeline</command:name><command:noun>DbaTimeline</command:noun><command:verb>ConvertTo</command:verb><maml:description><maml:para>Converts InputObject to a html timeline using Google Chart</maml:para></maml:description></command:details><maml:description><maml:para>This function accepts input as pipeline from the following dbatools functions:</maml:para><maml:para>Get-DbaAgentJobHistory</maml:para><maml:para>Get-DbaDbBackupHistory</maml:para><maml:para>(more to come...)</maml:para><maml:para>And generates Bootstrap based, HTML file with Google Chart Timeline</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>ConvertTo-DbaTimeline</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Pipe input, must an output from the above functions.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRowLabel</maml:name><maml:description><maml:para>By default, the Timeline shows SqlInstance and item name (agent job or database) in row labels section of the chart. When this parameter (ExcludeRowLabel) is set to true the row labels will not be shown which will maximise the chart area for better visualization. All relevant details are still available in the tooltip.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRowLabel</maml:name><maml:description><maml:para>By default, the Timeline shows SqlInstance and item name (agent job or database) in row labels section of the chart. When this parameter (ExcludeRowLabel) is set to true the row labels will not be shown which will maximise the chart area for better visualization. All relevant details are still available in the tooltip.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Pipe input, must an output from the above functions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Utility, Chart Author: Marcin Gminski (@marcingminski) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Dependency: ConvertTo-JsDate, Convert-DbaTimelineStatusColor </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql-1 -StartDate '2018-08-13 00:00' -EndDate '2018-08-13 23:59' -ExcludeJobSteps | ConvertTo-DbaTimeline | Out-File C:\temp\DbaAgentJobHistory.html -Encoding ASCII </dev:code><dev:remarks><maml:para> Creates 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlcm | Get-DbaDbBackupHistory -Since '2018-08-13 00:00' | ConvertTo-DbaTimeline | Out-File C:\temp\DbaBackupHistory.html -Encoding ASCII </dev:code><dev:remarks><maml:para> Creates an output file containing a pretty timeline for the agent job history since 2018-08-13 for all of the registered servers on sqlcm </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $messageParameters = @{ </dev:code><dev:remarks><maml:para> >> Subject = "Backup history for sql2017 and sql2016" >> Body = Get-DbaDbBackupHistory -SqlInstance sql2017, sql2016 -Since '2018-08-13 00:00' | ConvertTo-DbaTimeline | Out-String >> From = "dba@ad.local" >> To = "dba@ad.local" >> SmtpServer = "smtp.ad.local" >> } >> PS C:\> Send-MailMessage @messageParameters -BodyAsHtml Sends an email to dba@ad.local with the results of Get-DbaDbBackupHistory. Note that viewing these reports may not be supported in all email clients. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/ConvertTo-DbaTimeline</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>ConvertTo-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>ConvertTo</command:verb><maml:description><maml:para>Uses a slightly modified version of sp_SQLskills_ConvertTraceToExtendedEvents.sql to convert Traces to Extended Events.</maml:para></maml:description></command:details><maml:description><maml:para>Uses a slightly modified version of sp_SQLskills_ConvertTraceToExtendedEvents.sql to convert Traces to Extended Events.</maml:para><maml:para>T-SQL code by: Jonathan M. Kehayias, SQLskills.com. T-SQL can be found in this module directory and at</maml:para><maml:para>https://www.sqlskills.com/blogs/jonathan/converting-sql-trace-to-extended-events-in-sql-server-2012/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>ConvertTo-DbaXESession</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies a Trace object output by Get-DbaTrace.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the Trace to convert. If the name exists, characters will be appended to it.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Outputs the T-SQL script to create the XE session and does not execute it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies a Trace object output by Get-DbaTrace.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the Trace to convert. If the name exists, characters will be appended to it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Outputs the T-SQL script to create the XE session and does not execute it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace, ExtendedEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2017, sql2012 | Where-Object Id -eq 2 | ConvertTo-DbaXESession -Name 'Test' </dev:code><dev:remarks><maml:para> Converts 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2014 | Out-GridView -PassThru | ConvertTo-DbaXESession -Name 'Test' | Start-DbaXESession </dev:code><dev:remarks><maml:para> Converts selected traces on sql2014 to sessions, creates the session, and starts it. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2014 | Where-Object Id -eq 1 | ConvertTo-DbaXESession -Name 'Test' -OutputScriptOnly </dev:code><dev:remarks><maml:para> Converts trace ID 1 on sql2014 to an Extended Event and outputs the resulting T-SQL. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/ConvertTo-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentAlert</command:name><command:noun>DbaAgentAlert</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentAlert migrates alerts from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If the alert already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentAlert</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The alert(s) to process. This list is auto-populated from the server. If unspecified, all alerts will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>The alert(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDefaults</maml:name><maml:description><maml:para>Copy SQL Agent defaults such as FailSafeEmailAddress, ForwardingServer, and PagerSubjectTemplate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Alert will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The alert(s) to process. This list is auto-populated from the server. If unspecified, all alerts will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>The alert(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Alert will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDefaults</maml:name><maml:description><maml:para>Copy SQL Agent defaults such as FailSafeEmailAddress, ForwardingServer, and PagerSubjectTemplate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all alerts from sqlserver2014a to sqlcluster using Windows credentials. If alerts with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster -Alert PSAlert -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies a only the alert named PSAlert from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an alert with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentAlert -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentAlert</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentJob migrates jobs from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If the job already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentJob</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process. This list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableOnSource</maml:name><maml:description><maml:para>If this switch is enabled, the job will be disabled on the source server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the newly migrated job will be disabled on the destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Job will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped in jobs from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the newly migrated job will be disabled on the destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableOnSource</maml:name><maml:description><maml:para>If this switch is enabled, the job will be disabled on the source server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Job will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped in jobs from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process. This list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent, Job Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all jobs from sqlserver2014a to sqlcluster, using Windows credentials. If jobs with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster -Job PSJob -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJob -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sqlserver2014a | Where-Object Category -eq "Report Server" | Copy-DbaAgentJob -Destination sqlserver2014b </dev:code><dev:remarks><maml:para> Copies all SSRS jobs (subscriptions) from AlwaysOn Primary SQL instance sqlserver2014a to AlwaysOn Secondary SQL instance sqlserver2014b </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentJobCategory</command:name><command:noun>DbaAgentJobCategory</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentJobCategory migrates SQL Agent categories from one SQL Server to another. This is similar to sp_add_category.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all SQL Agent categories for Jobs, Operators and Alerts are copied.</maml:para><maml:para>The -OperatorCategories parameter is auto-populated for command-line completion and can be used to copy only specific operator categories.</maml:para><maml:para>The -AgentCategories parameter is auto-populated for command-line completion and can be used to copy only specific agent categories.</maml:para><maml:para>The -JobCategories parameter is auto-populated for command-line completion and can be used to copy only specific job categories.</maml:para><maml:para>If the category already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentJobCategory</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific job categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific agent categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OperatorCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific operator categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Category will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaAgentJobCategory</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>Specifies the Category Type to migrate. Valid options are "Job", "Alert" and "Operator". When CategoryType is specified, all categories from the selected type will be migrated. For granular migrations, use the three parameters below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific job categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific agent categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OperatorCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific operator categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Category will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific agent categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>Specifies the Category Type to migrate. Valid options are "Job", "Alert" and "Operator". When CategoryType is specified, all categories from the selected type will be migrated. For granular migrations, use the three parameters below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Category will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific job categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OperatorCategory</maml:name><maml:description><maml:para>This parameter is auto-populated for command-line completion and can be used to copy only specific operator categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJobCategory -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all operator categories from sqlserver2014a to sqlcluster using Windows authentication. If operator categories with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJobCategory -Source sqlserver2014a -Destination sqlcluster -OperatorCategory PSOperator -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies a single operator category, the PSOperator operator category from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials for sqlcluster. If an operator category with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentJobCategory -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentJobCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentOperator</command:name><command:noun>DbaAgentOperator</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentOperator migrates operators from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentOperator</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>The operator(s) to process. This list is auto-populated from the server. If unspecified, all operators will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operators(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operators(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>The operator(s) to process. This list is auto-populated from the server. If unspecified, all operators will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent, Operator Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all operators from sqlserver2014a to sqlcluster using Windows credentials. If operators with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster -Operator PSOperator -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentOperator -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentOperator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentProxy</command:name><command:noun>DbaAgentProxy</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentProxy migrates proxy accounts from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentProxy</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyAccount</maml:name><maml:description><maml:para>Only migrate specific proxy accounts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxyAccount</maml:name><maml:description><maml:para>Migrate all proxy accounts except the ones explicitly excluded</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxyAccount</maml:name><maml:description><maml:para>Migrate all proxy accounts except the ones explicitly excluded</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyAccount</maml:name><maml:description><maml:para>Only migrate specific proxy accounts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentProxy -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all proxy accounts from sqlserver2014a to sqlcluster using Windows credentials. If proxy accounts with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentProxy -Source sqlserver2014a -Destination sqlcluster -ProxyAccount PSProxy -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentProxy -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentProxy</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaAgentSchedule migrates shared job schedules from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>All shared job schedules are copied.</maml:para><maml:para>If 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentSchedule</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Copy only specific schedules. Note that SQL Server allows multiple schedules with the same name. Use Id for more accurate schedule copies.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Copy only specific schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgentSchedule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobSchedule[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobSchedule[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Copy only specific schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgentSchedule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobSchedule[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobSchedule[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Copy only specific schedules. Note that SQL Server allows multiple schedules with the same name. Use Id for more accurate schedule copies.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentSchedule -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentSchedule -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance sql2016 | Out-GridView -Passthru | Copy-DbaAgentSchedule -Destination sqlcluster </dev:code><dev:remarks><maml:para> Gets a list of schedule, outputs to a gridview which can be selected from, then copies to SqlInstance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaAgentServer</command:name><command:noun>DbaAgentServer</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy SQL Server Agent from one server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.).</maml:para><maml:para>You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaAgentServer</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the jobs will be disabled on Destination after copying.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnSource</maml:name><maml:description><maml:para>If this switch is enabled, the jobs will be disabled on Source after copying.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerProperties</maml:name><maml:description><maml:para>Skips the migration of Agent Server Properties (job history log, service state restart preferences, error log location, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing objects on Destination with matching names from Source will be dropped, then copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the jobs will be disabled on Destination after copying.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnSource</maml:name><maml:description><maml:para>If this switch is enabled, the jobs will be disabled on Source after copying.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerProperties</maml:name><maml:description><maml:para>Skips the migration of Agent Server Properties (job history log, service state restart preferences, error log location, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing objects on Destination with matching names from Source will be dropped, then copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, SqlServerAgent, SqlAgent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all job objects from sqlserver2014a to sqlcluster using SQL credentials to authentication to sqlserver2014a and Windows credentials to authenticate to sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaAgentServer -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaAgentServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaBackupDevice</command:name><command:noun>DbaBackupDevice</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copies backup devices one by one. Copies both SQL code and the backup file itself.</maml:para></maml:description></command:details><maml:description><maml:para>Backups are migrated using Admin shares. If the destination directory does not exist, SQL Server's default backup directory will be used.</maml:para><maml:para>If a backup device with same name exists on destination, it will not be dropped and recreated unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaBackupDevice</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupDevice</maml:name><maml:description><maml:para>BackupDevice to be copied. Auto-populated list of devices. If not provided all BackupDevice(s) will be copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, backup device(s) will be dropped and recreated if they already exists on destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupDevice</maml:name><maml:description><maml:para>BackupDevice to be copied. Auto-populated list of devices. If not provided all BackupDevice(s) will be copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, backup device(s) will be dropped and recreated if they already exists on destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster -BackupDevice backup01 -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 name exists on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaBackupDevice -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaBackupDevice</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaCredential</command:name><command:noun>DbaCredential</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaCredential migrates SQL Server Credentials from one SQL Server to another while maintaining Credential passwords.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Credit: https://blog.netspi.com/decrypting-mssql-database-link-server-passwords/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaCredential</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command requires access to the Windows OS via PowerShell remoting. Use this credential to connect to Windows using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Only include specific names Note: if spaces exist in the credential name, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>Excluded credential names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Credential will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command requires access to the Windows OS via PowerShell remoting. Use this credential to connect to Windows using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>Excluded credential names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Credential will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Only include specific names Note: if spaces exist in the credential name, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSMan, Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: - PowerShell Version 3.0 - Administrator access on Windows - sysadmin access on SQL Server. - DAC access enabled for local (default) </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCredential -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all SQL Server Credentials on sqlserver2014a to sqlcluster. If Credentials exist on destination, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCredential -Source sqlserver2014a -Destination sqlcluster -Name "PowerShell Proxy Account" -Force </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaCredential</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaCustomError</command:name><command:noun>DbaCustomError</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaCustomError migrates custom errors (user defined messages), by the custom error ID, from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaCustomError</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomError</maml:name><maml:description><maml:para>The custom error(s) to process. This list is auto-populated from the server. If unspecified, all custom errors will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCustomError</maml:name><maml:description><maml:para>The custom error(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the custom error will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomError</maml:name><maml:description><maml:para>The custom error(s) to process. This list is auto-populated from the server. If unspecified, all custom errors will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCustomError</maml:name><maml:description><maml:para>The custom error(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the custom error will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, CustomError Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCustomError -Source sqlserver2014a -SourceSqlCredential $scred -Destination sqlcluster -DestinationSqlCredential $dcred -CustomError 60000 -Force </dev:code><dev:remarks><maml:para> Copies 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 name exists on sqlcluster, it will be updated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster -ExcludeCustomError 60000 -Force </dev:code><dev:remarks><maml:para> Copies 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 -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaCustomError -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaCustomError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates SQL Server databases from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>By default, databases will be migrated to the destination SQL Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. Filestreams and filegroups are also migrated. Safety is emphasized.</maml:para><maml:para>If you are experiencing issues with Copy-DbaDatabase, please use Backup-DbaDatabase | Restore-DbaDatabase instead.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You may specify multiple servers. Note that when using -BackupRestore with multiple servers, the backup will only be performed once and backups will be deleted at the end (if you didn't specify -NoBackupCleanup). When using -DetachAttach with multiple servers, -Reattach must be specified.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Migrates only specified databases. This list is auto-populated from the server for tab completion. Multiple databases may be specified as a collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes specified databases when performing -AllDatabases migrations. This list is auto-populated from the Source for tab completion.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, all user databases will be migrated. System and support databases will not be migrated. Requires -BackupRestore or -DetachAttach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRestore</maml:name><maml:description><maml:para>If this switch is enabled, the copy-only backup and restore method will be used to migrate the database(s). This method requires that you specify -SharedPath in a valid UNC format (\\server\share). Backups will be immediately deleted after use unless -NoBackupCleanup is specified.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedBackupParams</maml:name><maml:description><maml:para>Provide additional parameters to the backup command as a hashtable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts must have read/write permission on this path. Can be either a full path 'c:\backups', a UNC path '\\server\backups' or an Azure storage Account 'https://example.blob.core.windows.net/sql/'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>If this switch is enabled, the restore is executed with WITH REPLACE.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is enabled, the restore is executed with WITH NORECOVERY. Ideal for staging.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoBackupCleanup</maml:name><maml:description><maml:para>If this switch is enabled, backups generated by this cmdlet will not be deleted after they are restored. The default behavior is to delete these backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NumberFiles</maml:name><maml:description><maml:para>Number of files to split the backup. Default is 3.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceReadOnly</maml:name><maml:description><maml:para>If this switch is enabled, all migrated databases are set to ReadOnly on Source prior to detach/attach & backup/restore. If -Reattach is used, databases are set to read-only after reattaching.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, databases will be migrated to a data and log directory structure on Destination mirroring that used on Source. By default, the default data and log directories for Destination will be used when the databases are migrated. The structure on Source will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc) To reuse Destination folder structure, use the -WithReplace switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSupportDbs</maml:name><maml:description><maml:para>If this switch is enabled, ReportServer, ReportServerTempDb, SSISDB, and distribution databases will be copied if they exist on Source. A log file named $SOURCE-$destinstance-$date-Sqls.csv will be written to the current directory. Use of this switch requires -BackupRestore or -DetachAttach as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full, diff and logs instead of performing backups. Note that the backups must exist in a location accessible by all destination servers, such a network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified, will to attempt to restore transaction log backups on top of existing database(s) in Recovering or Standby states. Only usable with -UseLastBackup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, backups will be taken without COPY_ONLY. This will break the LSN backup chain, which will interfere with the restore chain of the database. By default this switch is disabled, so backups will be taken with COPY_ONLY. This will preserve the LSN backup chain. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be copied as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be copied as part of the database copy operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceOffline</maml:name><maml:description><maml:para>If this switch is enabled, the Source database will be set to Offline after being copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>If a single database is being copied, this will be used to rename the database during the copy process. Any occurrence of the original database name in the physical file names will be replaced with NewName If specified with multiple databases a warning will be raised and the copy stopped This option is mutually exclusive of Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Prefix</maml:name><maml:description><maml:para>All copied database names and physical files will be prefixed with this string This option is mutually exclusive of NewName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing databases on Destination with matching names from Source will be dropped. If using -DetachReattach, mirrors will be broken and the database(s) dropped from Availability Groups. If using -SetSourceReadonly, this will instantly roll back any open transactions that may be stopping the process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You may specify multiple servers. Note that when using -BackupRestore with multiple servers, the backup will only be performed once and backups will be deleted at the end (if you didn't specify -NoBackupCleanup). When using -DetachAttach with multiple servers, -Reattach must be specified.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Migrates only specified databases. This list is auto-populated from the server for tab completion. Multiple databases may be specified as a collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes specified databases when performing -AllDatabases migrations. This list is auto-populated from the Source for tab completion.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, all user databases will be migrated. System and support databases will not be migrated. Requires -BackupRestore or -DetachAttach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DetachAttach</maml:name><maml:description><maml:para>If this switch is enabled, the detach/copy/attach method is used to perform database migrations. No files are deleted on Source. If Destination attachment fails, the Source database will be reattached. File copies are performed over administrative shares (\\server\x$\mssql) using BITS. If a database is being mirrored, the mirror will be broken prior to migration.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Reattach</maml:name><maml:description><maml:para>If this switch is enabled, all databases are reattached to Source after DetachAttach migration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceReadOnly</maml:name><maml:description><maml:para>If this switch is enabled, all migrated databases are set to ReadOnly on Source prior to detach/attach & backup/restore. If -Reattach is used, databases are set to read-only after reattaching.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, databases will be migrated to a data and log directory structure on Destination mirroring that used on Source. By default, the default data and log directories for Destination will be used when the databases are migrated. The structure on Source will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc) To reuse Destination folder structure, use the -WithReplace switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSupportDbs</maml:name><maml:description><maml:para>If this switch is enabled, ReportServer, ReportServerTempDb, SSISDB, and distribution databases will be copied if they exist on Source. A log file named $SOURCE-$destinstance-$date-Sqls.csv will be written to the current directory. Use of this switch requires -BackupRestore or -DetachAttach as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, backups will be taken without COPY_ONLY. This will break the LSN backup chain, which will interfere with the restore chain of the database. By default this switch is disabled, so backups will be taken with COPY_ONLY. This will preserve the LSN backup chain. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceOffline</maml:name><maml:description><maml:para>If this switch is enabled, the Source database will be set to Offline after being copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>If a single database is being copied, this will be used to rename the database during the copy process. Any occurrence of the original database name in the physical file names will be replaced with NewName If specified with multiple databases a warning will be raised and the copy stopped This option is mutually exclusive of Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Prefix</maml:name><maml:description><maml:para>All copied database names and physical files will be prefixed with this string This option is mutually exclusive of NewName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing databases on Destination with matching names from Source will be dropped. If using -DetachReattach, mirrors will be broken and the database(s) dropped from Availability Groups. If using -SetSourceReadonly, this will instantly roll back any open transactions that may be stopping the process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedBackupParams</maml:name><maml:description><maml:para>Provide additional parameters to the backup command as a hashtable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, all user databases will be migrated. System and support databases will not be migrated. Requires -BackupRestore or -DetachAttach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the credential on the SQL instance that can write to the AzureBaseUrl, only needed if using Storage access keys If using SAS credentials, the command will look for a credential with a name matching the AzureBaseUrl</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRestore</maml:name><maml:description><maml:para>If this switch is enabled, the copy-only backup and restore method will be used to migrate the database(s). This method requires that you specify -SharedPath in a valid UNC format (\\server\share). Backups will be immediately deleted after use unless -NoBackupCleanup is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified, will to attempt to restore transaction log backups on top of existing database(s) in Recovering or Standby states. Only usable with -UseLastBackup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Migrates only specified databases. This list is auto-populated from the server for tab completion. Multiple databases may be specified as a collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You may specify multiple servers. Note that when using -BackupRestore with multiple servers, the backup will only be performed once and backups will be deleted at the end (if you didn't specify -NoBackupCleanup). When using -DetachAttach with multiple servers, -Reattach must be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DetachAttach</maml:name><maml:description><maml:para>If this switch is enabled, the detach/copy/attach method is used to perform database migrations. No files are deleted on Source. If Destination attachment fails, the Source database will be reattached. File copies are performed over administrative shares (\\server\x$\mssql) using BITS. If a database is being mirrored, the mirror will be broken prior to migration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes specified databases when performing -AllDatabases migrations. This list is auto-populated from the Source for tab completion.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing databases on Destination with matching names from Source will be dropped. If using -DetachReattach, mirrors will be broken and the database(s) dropped from Availability Groups. If using -SetSourceReadonly, this will instantly roll back any open transactions that may be stopping the process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSupportDbs</maml:name><maml:description><maml:para>If this switch is enabled, ReportServer, ReportServerTempDb, SSISDB, and distribution databases will be copied if they exist on Source. A log file named $SOURCE-$destinstance-$date-Sqls.csv will be written to the current directory. Use of this switch requires -BackupRestore or -DetachAttach as well.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be copied as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be copied as part of the database copy operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>If a single database is being copied, this will be used to rename the database during the copy process. Any occurrence of the original database name in the physical file names will be replaced with NewName If specified with multiple databases a warning will be raised and the copy stopped This option is mutually exclusive of Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoBackupCleanup</maml:name><maml:description><maml:para>If this switch is enabled, backups generated by this cmdlet will not be deleted after they are restored. The default behavior is to delete these backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, backups will be taken without COPY_ONLY. This will break the LSN backup chain, which will interfere with the restore chain of the database. By default this switch is disabled, so backups will be taken with COPY_ONLY. This will preserve the LSN backup chain. For more details please refer to this MSDN article - https://msdn.microsoft.com/en-us/library/ms191495.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is enabled, the restore is executed with WITH NORECOVERY. Ideal for staging.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NumberFiles</maml:name><maml:description><maml:para>Number of files to split the backup. Default is 3.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Prefix</maml:name><maml:description><maml:para>All copied database names and physical files will be prefixed with this string This option is mutually exclusive of NewName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Reattach</maml:name><maml:description><maml:para>If this switch is enabled, all databases are reattached to Source after DetachAttach migration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, databases will be migrated to a data and log directory structure on Destination mirroring that used on Source. By default, the default data and log directories for Destination will be used when the databases are migrated. The structure on Source will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc) To reuse Destination folder structure, use the -WithReplace switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceOffline</maml:name><maml:description><maml:para>If this switch is enabled, the Source database will be set to Offline after being copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceReadOnly</maml:name><maml:description><maml:para>If this switch is enabled, all migrated databases are set to ReadOnly on Source prior to detach/attach & backup/restore. If -Reattach is used, databases are set to read-only after reattaching.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts must have read/write permission on this path. Can be either a full path 'c:\backups', a UNC path '\\server\backups' or an Azure storage Account 'https://example.blob.core.windows.net/sql/'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full, diff and logs instead of performing backups. Note that the backups must exist in a location accessible by all destination servers, such a network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>If this switch is enabled, the restore is executed with WITH REPLACE.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Restore Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers Limitations: - Doesn't cover what it doesn't cover (replication, certificates, etc) - SQL Server 2000 databases cannot be directly migrated to SQL Server 2012 and above. - Logins within SQL Server 2012 and above logins cannot be migrated to SQL Server 2008 R2 and below. </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014a -Destination sql2014b -Database TestDB -BackupRestore -SharedPath \\fileshare\sql\migration </dev:code><dev:remarks><maml:para> Migrates a single user database TestDB using Backup and restore from instance sql2014a to sql2014b. Backup files are stored in \\fileshare\sql\migration. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2012 -Destination sql2014, sql2016 -DetachAttach -Reattach </dev:code><dev:remarks><maml:para> Databases 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 files, 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* exist and aren't in use, they will be overwritten. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014a -Destination sqlcluster, sql2016 -BackupRestore -UseLastBackup -Force </dev:code><dev:remarks><maml:para> Migrates all user databases to sqlcluster and sql2016 using the last Full, Diff and Log backups from sql204a. If the databases exist on the destinations, they will be dropped prior to attach. Note that the backups must exist in a location accessible by all destination servers, such a network share. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014a -Destination sqlcluster -ExcludeDatabase Northwind, pubs -IncludeSupportDbs -Force -BackupRestore -SharedPath \\fileshare\sql\migration </dev:code><dev:remarks><maml:para> Migrates 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 be dropped prior to attach. It also includes the support databases (ReportServer, ReportServerTempDb, SSISDB, distribution). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014 -Destination managedinstance.cus19c972e4513d6.database.windows.net -DestinationSqlCredential $cred -AllDatabases -BackupRestore -SharedPath https://someblob.blob.core.windows.net/sql </dev:code><dev:remarks><maml:para> Migrate all user databases from instance sql2014 to the specified Azure SQL Manage Instance using the blob storage account https://someblob.blob.core.windows.net/sql using a Shared Access Signature (SAS) credential with a name matching the blob storage account </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014 -Destination managedinstance.cus19c972e4513d6.database.windows.net -DestinationSqlCredential $cred -Database MyDb -NewName AzureDb -WithReplace -BackupRestore -SharedPath https://someblob.blob.core.windows.net/sql -AzureCredential AzBlobCredential </dev:code><dev:remarks><maml:para> Migrates Mydb from instance sql2014 to AzureDb on the specified Azure SQL Manage Instance, replacing the existing AzureDb if it exists, using the blob storage account https://someblob.blob.core.windows.net/sql using the Sql Server Credential AzBlobCredential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sql2014a -Destination sqlcluster -BackupRestore -SharedPath \\FS\Backup -AdvancedBackupParams @{ CompressBackup = $true } </dev:code><dev:remarks><maml:para> Migrates all user databases to sqlcluster. Uses the parameter CompressBackup with the backup command to save some space on the shared path. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDatabase -Source sqlcs -Destination sqlcs -Database t -DetachAttach -NewName t_copy -Reattach </dev:code><dev:remarks><maml:para> Copies database t from sqlcs to the same server (sqlcs) using the detach/copy/attach method. The new database will be named t_copy and the original database will be reattached. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDataCollector</command:name><command:noun>DbaDataCollector</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates user SQL Data Collector collection sets. SQL Data Collector configuration is on the agenda, but it's hard.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all data collector objects are migrated. If the object already exists on the destination, it will be skipped unless -Force is used.</maml:para><maml:para>The -CollectionSet parameter is auto-populated for command-line completion and can be used to copy only specific objects.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDataCollector</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionSet</maml:name><maml:description><maml:para>The collection set(s) to process - this list is auto-populated from the server. If unspecified, all collection sets will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCollectionSet</maml:name><maml:description><maml:para>The collection set(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoServerReconfig</maml:name><maml:description><maml:para>Upcoming parameter to enable server reconfiguration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If collection sets exists on destination server, it will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionSet</maml:name><maml:description><maml:para>The collection set(s) to process - this list is auto-populated from the server. If unspecified, all collection sets will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCollectionSet</maml:name><maml:description><maml:para>The collection set(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If collection sets exists on destination server, it will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoServerReconfig</maml:name><maml:description><maml:para>Upcoming parameter to enable server reconfiguration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration,DataCollection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all Data Collector Objects and Configurations from sqlserver2014a to sqlcluster, using Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all Data Collector Objects and Configurations from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDataCollector -Source sqlserver2014a -Destination sqlcluster -CollectionSet 'Server Activity', 'Table Usage Analysis' </dev:code><dev:remarks><maml:para> Copies two Collection Sets, Server Activity and Table Usage Analysis, from sqlserver2014a to sqlcluster. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDataCollector</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbAssembly</command:name><command:noun>DbaDbAssembly</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaDbAssembly migrates assemblies from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all assemblies are copied.</maml:para><maml:para>If the assembly already exists on the destination, it will be skipped unless -Force is used.</maml:para><maml:para>This script does not yet copy dependencies or dependent objects.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbAssembly</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Assembly</maml:name><maml:description><maml:para>The assembly(ies) to process. This list is auto-populated from the server. If unspecified, all assemblies will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAssembly</maml:name><maml:description><maml:para>The assembly(ies) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing assemblies on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Assembly</maml:name><maml:description><maml:para>The assembly(ies) to process. This list is auto-populated from the server. If unspecified, all assemblies will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAssembly</maml:name><maml:description><maml:para>The assembly(ies) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing assemblies on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Assembly Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all assemblies from sqlserver2014a to sqlcluster using Windows credentials. If assemblies with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster -Assembly dbname.assemblyname, dbname3.anotherassembly -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies two assemblies, the dbname.assemblyname and dbname3.anotherassembly from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an assembly with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used. In this example, anotherassembly will be copied to the dbname3 database on the server sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbAssembly -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbAssembly</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaDbCertificate migrates certificates from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all certificates are copied.</maml:para><maml:para>If the certificate already exists on the destination, it will be skipped.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbCertificate</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The certificate(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCertificate</maml:name><maml:description><maml:para>The certificate(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts on both Source and Destination must have read/write permission to access this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeyPassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The certificate(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>A string value that specifies the secure password to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCertificate</maml:name><maml:description><maml:para>The certificate(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeyPassword</maml:name><maml:description><maml:para>The password to encrypt the exported key. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts on both Source and Destination must have read/write permission to access this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Certificate Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbCertificate -Source sql01 -Destination sql02 -EncryptionPassword $cred.Password -MasterKeyPassword $cred.Password -SharedPath \\nas\sql\shared </dev:code><dev:remarks><maml:para> Copies database certificates for matching databases on sql02 and creates master keys if needed Uses password from $cred object created by Get-Credential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params1 = @{ </dev:code><dev:remarks><maml:para> >> Source = "sql01" >> Destination = "sql02" >> EncryptionPassword = $passwd >> MasterKeyPassword = $passwd >> SharedPath = "\\nas\sql\shared" >> } PS C:\> Copy-DbaDbCertificate @params1 -Confirm:$false -OutVariable results Copies database certificates for matching databases on sql02 and creates master keys if needed </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbMail</command:name><command:noun>DbaDbMail</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates Mail Profiles, Accounts, Mail Servers and Mail Server Configs from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all mail configurations for Profiles, Accounts, Mail Servers and Configs are copied.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbMail</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing objects on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaDbMail</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies the object type to migrate. Valid options are 'ConfigurationValues', 'Profiles', 'Accounts', and 'MailServers'. When Type is specified, all categories from the selected type will be migrated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing objects on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing objects on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies the object type to migrate. Valid options are 'ConfigurationValues', 'Profiles', 'Accounts', and 'MailServers'. When Type is specified, all categories from the selected type will be migrated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Mail Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all database mail objects from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbMail -Source sqlserver2014a -Destination sqlcluster -EnableException </dev:code><dev:remarks><maml:para> Performs execution of function, and will throw a terminating exception if something breaks </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbMail</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbQueryStoreOption</command:name><command:noun>DbaDbQueryStoreOption</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copies the configuration of a Query Store enabled database and sets the copied configuration on other databases.</maml:para></maml:description></command:details><maml:description><maml:para>Copies the configuration of a Query Store enabled database and sets the copied configuration on other databases.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbQueryStoreOption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2016 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SourceDatabase</maml:name><maml:description><maml:para>Specifies the database to copy the Query Store configuration from.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2016 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>Specifies a list of databases that will receive a copy of the Query Store configuration of the SourceDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Specifies a list of databases which will NOT receive a copy of the Query Store configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, the Query Store configuration will be copied to all databases on the destination instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, the Query Store configuration will be copied to all databases on the destination instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2016 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>Specifies a list of databases that will receive a copy of the Query Store configuration of the SourceDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Specifies a list of databases which will NOT receive a copy of the Query Store configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2016 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceDatabase</maml:name><maml:description><maml:para>Specifies the database to copy the Query Store configuration from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: QueryStore Author: Enrico van de Laar (@evdlaar) | Tracy Boggiano (@Tracy Boggiano) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbQueryStoreOption -Source ServerA\SQL -SourceDatabase AdventureWorks -Destination ServerB\SQL -AllDatabases </dev:code><dev:remarks><maml:para> Copy 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbQueryStoreOption -Source ServerA\SQL -SourceDatabase AdventureWorks -Destination ServerB\SQL -DestinationDatabase WorldWideTraders </dev:code><dev:remarks><maml:para> Copy 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbQueryStoreOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbTableData</command:name><command:noun>DbaDbTableData</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copies data between SQL Server tables.</maml:para></maml:description></command:details><maml:description><maml:para>Copies data between SQL Server tables using SQL Bulk Copy.</maml:para><maml:para>The same can be achieved also using Invoke-DbaQuery and Write-DbaDbTableData but it will buffer the contents of that table in memory of the machine running the commands.</maml:para><maml:para>This function prevents that by streaming a copy of the data in the most speedy and least resource-intensive way.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbTableData</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the destination instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the table from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the table to. If not specified, it is assumed to be the same of Database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specify a table to use as a source. You can specify a 2 or 3 part name. If the object has special characters please wrap them in square brackets. Note: Cannot specify a view if a table value is provided</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>Specify a view to use as a source. You can specify a 2 or 3 part name (see examples). If the object has special characters please wrap them in square brackets. Note: Cannot specify a table if a view value is provided</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Define a query to use as a source. Note: 3 or 4 part object names may be used (see examples) Ensure to select all required columns. Calculated Columns or columns with default values may be excluded. Note: The workflow in the command requires that a valid -Table or -View parameter value be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates the destination table if it does not already exist, based off of the "Export..." script of the source table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. The default is 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>The table you want to use as destination. If not specified, it is assumed to be the same of Table</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeout</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 5000 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandTimeout</maml:name><maml:description><maml:para>Gets or sets the wait time (in seconds) before terminating the attempt to execute the reader and bulk copy operation. The default is 0 seconds (no timeout).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of Table objects from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TableViewBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TableViewBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates the destination table if it does not already exist, based off of the "Export..." script of the source table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeout</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 5000 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandTimeout</maml:name><maml:description><maml:para>Gets or sets the wait time (in seconds) before terminating the attempt to execute the reader and bulk copy operation. The default is 0 seconds (no timeout).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the table from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the table to. If not specified, it is assumed to be the same of Database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the destination instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>The table you want to use as destination. If not specified, it is assumed to be the same of Table</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of Table objects from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TableViewBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TableViewBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. The default is 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Define a query to use as a source. Note: 3 or 4 part object names may be used (see examples) Ensure to select all required columns. Calculated Columns or columns with default values may be excluded. Note: The workflow in the command requires that a valid -Table or -View parameter value be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specify a table to use as a source. You can specify a 2 or 3 part name. If the object has special characters please wrap them in square brackets. Note: Cannot specify a view if a table value is provided</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>Specify a view to use as a source. You can specify a 2 or 3 part name (see examples). If the object has special characters please wrap them in square brackets. Note: Cannot specify a table if a view value is provided</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data Author: Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table dbo.test_table </dev:code><dev:remarks><maml:para> Copies all the data from table dbo.test_table (2-part name) in database dbatools_from on sql1 to table test_table in database dbatools_from on sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -DestinationDatabase dbatools_dest -Table [Schema].[test table] </dev:code><dev:remarks><maml:para> Copies all the data from table [Schema].[test table] (2-part name) in database dbatools_from on sql1 to table [Schema].[test table] in database dbatools_dest on sql2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql1 -Database tempdb -Table tb1, tb2 | Copy-DbaDbTableData -DestinationTable tb3 </dev:code><dev:remarks><maml:para> Copies all data from tables tb1 and tb2 in tempdb on sql1 to tb3 in tempdb on sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql1 -Database tempdb -Table tb1, tb2 | Copy-DbaDbTableData -Destination sql2 </dev:code><dev:remarks><maml:para> Copies data from tb1 and tb2 in tempdb on sql1 to the same table in tempdb on sql2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbTableData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -Table test_table -KeepIdentity -Truncate </dev:code><dev:remarks><maml:para> Copies all the data in table test_table from sql1 to sql2, using the database dbatools_from, keeping identity columns and truncating the destination </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = 'sql1' >> Destination = 'sql2' >> Database = 'dbatools_from' >> DestinationDatabase = 'dbatools_dest' >> Table = '[Schema].[Table]' >> DestinationTable = '[dbo].[Table.Copy]' >> KeepIdentity = $true >> KeepNulls = $true >> Truncate = $true >> BatchSize = 10000 >> } >> PS C:\> Copy-DbaDbTableData @params Copies all the data from table [Schema].[Table] (2-part name) in database dbatools_from on sql1 to table [dbo].[Table.Copy] in database dbatools_dest on sql2 Keeps identity columns and Nulls, truncates the destination and processes in BatchSize of 10000. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = 'server1' >> Destination = 'server1' >> Database = 'AdventureWorks2017' >> DestinationDatabase = 'AdventureWorks2017' >> DestinationTable = '[AdventureWorks2017].[Person].[EmailPromotion]' >> BatchSize = 10000 >> Query = "SELECT * FROM [OtherDb].[Person].[Person] where EmailPromotion = 1" >> } >> PS C:\> Copy-DbaDbTableData @params Copies data returned from the query on server1 into the AdventureWorks2017 on server1, using a 4-part name for the DestinationTableTable parameter. Copy is processed in BatchSize of 10000 rows. See the Query param documentation for more details. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbTableData -SqlInstance sql1 -Database tempdb -View [tempdb].[dbo].[vw1] -DestinationTable [SampleDb].[SampleSchema].[SampleTable] -AutoCreateTable </dev:code><dev:remarks><maml:para> Copies all data from [tempdb].[dbo].[vw1] (3-part name) view on instance sql1 to an auto-created table [SampleDb].[SampleSchema].[SampleTable] on instance sql1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbTableData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaDbViewData</command:name><command:noun>DbaDbViewData</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copies data from a SQL Server view to a table.</maml:para></maml:description></command:details><maml:description><maml:para>Copies data from a SQL Server view to a table using SQL Bulk Copy.</maml:para><maml:para>With this function, a streaming copy will be done in the most speedy and least resource-intensive way.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaDbViewData</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the destination instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the table from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the table to. If not specified, it is assumed to be the same of Database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>Specify a view to use as a source. You can specify a 2 or 3 part name (see examples). If the object has special characters please wrap them in square brackets.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Define a query to use as a source. Note: 3 or 4 part object names may be used (see examples) Ensure to select all required columns. Calculated Columns or columns with default values may be excluded. Note: The workflow in the command requires that a valid -Table or -View parameter value be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates the destination table if it does not already exist, based off of the "Export..." script of the source table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. The default is 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>The table you want to use as destination. If not specified, it is assumed to be the same of View</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 5000 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of View objects from Get-DbaDbView</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TableViewBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TableViewBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates the destination table if it does not already exist, based off of the "Export..." script of the source table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 5000 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the table from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the table to. If not specified, it is assumed to be the same of Database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the destination instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>The table you want to use as destination. If not specified, it is assumed to be the same of View</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of View objects from Get-DbaDbView</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TableViewBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TableViewBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. The default is 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Define a query to use as a source. Note: 3 or 4 part object names may be used (see examples) Ensure to select all required columns. Calculated Columns or columns with default values may be excluded. Note: The workflow in the command requires that a valid -Table or -View parameter value be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>Specify a view to use as a source. You can specify a 2 or 3 part name (see examples). If the object has special characters please wrap them in square brackets.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data Author: Stephen Swan (@jaxnoth) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbViewData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -View dbo.test_view </dev:code><dev:remarks><maml:para> Copies all the data from view dbo.test_view (2-part name) in database dbatools_from on sql1 to view test_view in database dbatools_from on sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbViewData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -DestinationDatabase dbatools_dest -DestinationTable [Schema].[test table] </dev:code><dev:remarks><maml:para> Copies all the data from view [Schema].[test view] (2-part name) in database dbatools_from on sql1 to table [Schema].[test table] in database dbatools_dest on sql2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance sql1 -Database tempdb -View vw1, vw2 | Copy-DbaDbViewData -DestinationTable tb3 </dev:code><dev:remarks><maml:para> Copies all data from Views vw1 and vw2 in tempdb on sql1 to tb3 in tempdb on sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance sql1 -Database tempdb -View vw1, vw2 | Copy-DbaDbViewData -Destination sql2 </dev:code><dev:remarks><maml:para> Copies data from tbl1 in tempdb on sql1 to tbl1 in tempdb on sql2 then Copies data from tbl2 in tempdb on sql1 to tbl2 in tempdb on sql2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaDbViewData -SqlInstance sql1 -Destination sql2 -Database dbatools_from -View test_view -KeepIdentity -Truncate </dev:code><dev:remarks><maml:para> Copies all the data in view test_view from sql1 to sql2, using the database dbatools_from, keeping identity columns and truncating the destination </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = 'sql1' >> Destination = 'sql2' >> Database = 'dbatools_from' >> DestinationDatabase = 'dbatools_dest' >> View = '[Schema].[View]' >> DestinationTable = '[dbo].[View.Copy]' >> KeepIdentity = $true >> KeepNulls = $true >> Truncate = $true >> BatchSize = 10000 >> } >> PS C:\> Copy-DbaDbViewData @params Copies all the data from view [Schema].[View] in database dbatools_from on sql1 to table [dbo].[Table.Copy] in database dbatools_dest on sql2 Keeps identity columns and Nulls, truncates the destination and processes in BatchSize of 10000. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = 'server1' >> Destination = 'server1' >> Database = 'AdventureWorks2017' >> DestinationDatabase = 'AdventureWorks2017' >> View = '[AdventureWorks2017].[Person].[EmailPromotion]' >> BatchSize = 10000 >> Query = "SELECT * FROM [OtherDb].[Person].[Person] where EmailPromotion = 1" >> } >> PS C:\> Copy-DbaDbViewData @params Copies data returned from the query on server1 into the AdventureWorks2017 on server1. This query uses a 3-part name to reference the object in the query value, it will try to find the view named "Person" in the schema "Person" and database "OtherDb". Copy is processed in BatchSize of 10000 rows. See the -Query param documentation for more details. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaDbViewData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaEndpoint migrates server endpoints from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all endpoints are copied.</maml:para><maml:para>If the endpoint already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaEndpoint</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>The endpoint(s) to process. This list is auto-populated from the server. If unspecified, all endpoints will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeEndpoint</maml:name><maml:description><maml:para>The endpoint(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing endpoints on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>The endpoint(s) to process. This list is auto-populated from the server. If unspecified, all endpoints will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeEndpoint</maml:name><maml:description><maml:para>The endpoint(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing endpoints on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaEndpoint -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all server endpoints from sqlserver2014a to sqlcluster, using Windows credentials. If endpoints with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaEndpoint -Source sqlserver2014a -SourceSqlCredential $cred -Destination sqlcluster -Endpoint tg_noDbDrop -Force </dev:code><dev:remarks><maml:para> Copies 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 sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaEndpoint -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaInstanceAudit</command:name><command:noun>DbaInstanceAudit</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaInstanceAudit migrates server audits from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If the audit already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaInstanceAudit</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Audit</maml:name><maml:description><maml:para>The audit(s) to process. Options for this list are auto-populated from the server. If unspecified, all audits will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAudit</maml:name><maml:description><maml:para>The audit(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Destination file path. If not specified, the file path of the source will be used (or the default data directory).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the audits will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Audit</maml:name><maml:description><maml:para>The audit(s) to process. Options for this list are auto-populated from the server. If unspecified, all audits will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAudit</maml:name><maml:description><maml:para>The audit(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the audits will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Destination file path. If not specified, the file path of the source will be used (or the default data directory).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all server audits from sqlserver2014a to sqlcluster, using Windows credentials. If audits with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster -Audit tg_noDbDrop -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAudit -Source sqlserver-0 -Destination sqlserver-1 -Audit audit1 -Path 'C:\audit1' </dev:code><dev:remarks><maml:para> Copies audit audit1 from sqlserver-0 to sqlserver-1. The file path on sqlserver-1 will be set to 'C:\audit1'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaInstanceAudit</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaInstanceAuditSpecification</command:name><command:noun>DbaInstanceAuditSpecification</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaInstanceAuditSpecification migrates server audit specifications from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If the audit specification already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaInstanceAuditSpecification</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AuditSpecification</maml:name><maml:description><maml:para>The Server Audit Specification(s) to process. Options for this list are auto-populated from the server. If unspecified, all Server Audit Specifications will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAuditSpecification</maml:name><maml:description><maml:para>The Server Audit Specification(s) to exclude. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Audits Specifications will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AuditSpecification</maml:name><maml:description><maml:para>The Server Audit Specification(s) to process. Options for this list are auto-populated from the server. If unspecified, all Server Audit Specifications will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAuditSpecification</maml:name><maml:description><maml:para>The Server Audit Specification(s) to exclude. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Audits Specifications will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration,ServerAudit,AuditSpecification Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster -AuditSpecification tg_noDbDrop -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 specification with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaInstanceAuditSpecification</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaInstanceTrigger</command:name><command:noun>DbaInstanceTrigger</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaInstanceTrigger migrates server triggers from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>If the trigger already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaInstanceTrigger</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerTrigger</maml:name><maml:description><maml:para>The Server Trigger(s) to process - this list is auto-populated from the server. If unspecified, all Server Triggers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerTrigger</maml:name><maml:description><maml:para>The Server Trigger(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drops and recreates the Trigger if it exists</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerTrigger</maml:name><maml:description><maml:para>The Server Trigger(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drops and recreates the Trigger if it exists</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerTrigger</maml:name><maml:description><maml:para>The Server Trigger(s) to process - this list is auto-populated from the server. If unspecified, all Server Triggers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all server triggers from sqlserver2014a to sqlcluster, using Windows credentials. If triggers with the same name exist on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster -ServerTrigger tg_noDbDrop -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies 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 exists on sqlcluster, it will be dropped and recreated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaInstanceTrigger</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaLinkedServer</command:name><command:noun>DbaLinkedServer</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaLinkedServer migrates Linked Servers from one SQL Server to another. Linked Server logins and passwords are migrated as well.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Credit: https://blog.netspi.com/decrypting-mssql-database-link-server-passwords/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaLinkedServer</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server (2005 and above). You must have sysadmin access to both SQL Server and Windows.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server (2005 and above). You must have sysadmin access to both SQL Server and Windows.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to process - this list is auto-populated from the server. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLinkedServer</maml:name><maml:description><maml:para>The linked server(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpgradeSqlClient</maml:name><maml:description><maml:para>Upgrade any SqlClient Linked Server to the current version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Copies the logins but does not access, decrypt or create sensitive information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default, if a Linked Server exists on the source and destination, the Linked Server is not copied over. Specifying -force will drop and recreate the Linked Server on the Destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server (2005 and above). You must have sysadmin access to both SQL Server and Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLinkedServer</maml:name><maml:description><maml:para>The linked server(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Copies the logins but does not access, decrypt or create sensitive information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default, if a Linked Server exists on the source and destination, the Linked Server is not copied over. Specifying -force will drop and recreate the Linked Server on the Destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to process - this list is auto-populated from the server. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server (2005 and above). You must have sysadmin access to both SQL Server and Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpgradeSqlClient</maml:name><maml:description><maml:para>Upgrade any SqlClient Linked Server to the current version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSMan, Migration, LinkedServer Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers Limitations: This just copies the SQL portion. It does not copy files (i.e. a local SQLite database, or Microsoft Access DB), nor does it configure ODBC entries. </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLinkedServer -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all SQL Server Linked Servers on sqlserver2014a to sqlcluster. If Linked Server exists on destination, it will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLinkedServer -Source sqlserver2014a -Destination sqlcluster -LinkedServer SQL2K5,SQL2k -Force </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaLinkedServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates logins from source to destination SQL Servers. Supports SQL Server versions 2000 and newer.</maml:para></maml:description></command:details><maml:description><maml:para>SQL Server 2000: Migrates logins with SIDs, passwords, server roles and database roles.</maml:para><maml:para>SQL Server 2005 & newer: Migrates logins with SIDs, passwords, defaultdb, server roles & securables, database permissions & securables, login attributes (enforce password policy, expiration, etc.)</maml:para><maml:para>The 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaLogin</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaLogin</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SyncSaName</maml:name><maml:description><maml:para>If this switch is enabled, the name of the sa account will be synced between Source and Destination</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaLogin</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutFile</maml:name><maml:description><maml:para>Calls Export-DbaLogin and exports all logins to a T-SQL formatted file. This does not perform a copy, so no destination is required.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaLogin</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Copy-DbaLogin</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SyncSaName</maml:name><maml:description><maml:para>If this switch is enabled, the name of the sa account will be synced between Source and Destination</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePermissionSync</maml:name><maml:description><maml:para>Skips permission syncs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogins</maml:name><maml:description><maml:para>If this switch is enabled, NT SERVICE accounts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KillActiveConnection</maml:name><maml:description><maml:para>A login cannot be dropped when it has active connections on the instance. If this switch is enabled, all active connections and sessions on Destination will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to create logins under different names based on hashtable mapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the source login objects to generate new sids on the destination server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutFile</maml:name><maml:description><maml:para>Calls Export-DbaLogin and exports all logins to a T-SQL formatted file. This does not perform a copy, so no destination is required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SyncSaName</maml:name><maml:description><maml:para>If this switch is enabled, the name of the sa account will be synced between Source and Destination</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Login Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Force </dev:code><dev:remarks><maml:para> Copies all logins from Source Destination. If a SQL Login on Source exists on the Destination, the Login on Destination will be dropped and recreated. If active connections are found for a login, the copy of that Login will fail as it cannot be dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Force -KillActiveConnection </dev:code><dev:remarks><maml:para> Copies all logins from Source Destination. If a SQL Login on Source exists on the Destination, the Login on Destination will be dropped and recreated. If any active connections are found they will be killed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -ExcludeLogin realcajun -SourceSqlCredential $scred -DestinationSqlCredential $dcred </dev:code><dev:remarks><maml:para> Copies all Logins from Source to Destination except for realcajun using SQL Authentication to connect to both instances. If a Login already exists on the destination, it will not be migrated. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -Source sqlserver2014a -Destination sqlcluster -Login realcajun, netnerds -force </dev:code><dev:remarks><maml:para> Copies ONLY Logins netnerds and realcajun. If Login realcajun or netnerds exists on Destination, the existing Login(s) will be dropped and recreated. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -LoginRenameHashtable @{ "PreviousUser" = "newlogin" } -Source $Sql01 -Destination Localhost -SourceSqlCredential $sqlcred -Login PreviousUser </dev:code><dev:remarks><maml:para> Copies PreviousUser as newlogin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaLogin -LoginRenameHashtable @{ OldLogin = "NewLogin" } -Source Sql01 -Destination Sql01 -Login ORG\OldLogin -ObjectLevel -NewSid </dev:code><dev:remarks><maml:para> Clones OldLogin as NewLogin onto the same server, generating a new SID for the login. Also clones object-level permissions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 | Out-GridView -Passthru | Copy-DbaLogin -Destination sql2017 </dev:code><dev:remarks><maml:para> Displays all available logins on sql2016 in a grid view, then copies all selected logins to sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $loginSplat = @{ </dev:code><dev:remarks><maml:para> >> Source = $Sql01 >> Destination = "Localhost" >> SourceSqlCredential = $sqlcred >> Login = 'ReadUserP', 'ReadWriteUserP', 'AdminP' >> LoginRenameHashtable = @{ >> "ReadUserP" = "ReadUserT" >> "ReadWriteUserP" = "ReadWriteUserT" >> "AdminP" = "AdminT" >> } >> } PS C:\> Copy-DbaLogin @loginSplat Copies the three specified logins to 'localhost' and renames them according to the LoginRenameHashTable. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaPolicyManagement</command:name><command:noun>DbaPolicyManagement</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates SQL Policy Based Management Objects, including both policies and conditions.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all policies and conditions are copied. If an object already exist on the destination, it will be skipped unless -Force is used.</maml:para><maml:para>The -Policy and -Condition parameters are auto-populated for command-line completion and can be used to copy only specific objects.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaPolicyManagement</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Policy</maml:name><maml:description><maml:para>The policy(ies) to process - this list is auto-populated from the server. If unspecified, all policies will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePolicy</maml:name><maml:description><maml:para>The policy(ies) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Condition</maml:name><maml:description><maml:para>The condition(s) to process - this list is auto-populated from the server. If unspecified, all conditions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCondition</maml:name><maml:description><maml:para>The condition(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If policies exists on destination server, it will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Condition</maml:name><maml:description><maml:para>The condition(s) to process - this list is auto-populated from the server. If unspecified, all conditions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination Sql Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCondition</maml:name><maml:description><maml:para>The condition(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePolicy</maml:name><maml:description><maml:para>The policy(ies) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If policies exists on destination server, it will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Policy</maml:name><maml:description><maml:para>The policy(ies) to process - this list is auto-populated from the server. If unspecified, all policies will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all policies and conditions from sqlserver2014a to sqlcluster, using Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all policies and conditions from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaPolicyManagement -Source sqlserver2014a -Destination sqlcluster -Policy 'xp_cmdshell must be disabled' </dev:code><dev:remarks><maml:para> Copies only one policy, 'xp_cmdshell must be disabled' from sqlserver2014a to sqlcluster. No conditions are migrated. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaPolicyManagement</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates SQL Server Central Management groups and server instances from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>Copy-DbaRegServer copies all groups, subgroups, and server instances from one SQL Server to another.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaRegServer</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>This is an auto-populated array that contains your Central Management Server top-level groups on Source. You can specify one, many or none. If Group is not specified, all groups in your Central Management Server will be copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SwitchServerName</maml:name><maml:description><maml:para>If this switch is enabled, all instance names will be changed from Source to Destination. Central Management Server does not allow you to add a shared registered server with the same name as the Configuration Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, group(s) will be dropped and recreated if they already exists on destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, group(s) will be dropped and recreated if they already exists on destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>This is an auto-populated array that contains your Central Management Server top-level groups on Source. You can specify one, many or none. If Group is not specified, all groups in your Central Management Server will be copied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SwitchServerName</maml:name><maml:description><maml:para>If this switch is enabled, all instance names will be changed from Source to Destination. Central Management Server does not allow you to add a shared registered server with the same name as the Configuration Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaRegServer -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> All groups, subgroups, and server instances are copied from sqlserver2014a CMS to sqlcluster CMS. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaRegServer -Source sqlserver2014a -Destination sqlcluster -Group Group1,Group3 </dev:code><dev:remarks><maml:para> Top-level groups Group1 and Group3 along with their subgroups and server instances are copied from sqlserver to sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaRegServer -Source sqlserver2014a -Destination sqlcluster -Group Group1,Group3 -SwitchServerName -SourceSqlCredential $SourceSqlCredential -DestinationSqlCredential $DestinationSqlCredential </dev:code><dev:remarks><maml:para> Top-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 migrating instance is "sqlcluster", it will be switched to "sqlserver". If SwitchServerName is not specified, "sqlcluster" will be skipped. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaResourceGovernor</command:name><command:noun>DbaResourceGovernor</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates Resource Pools</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>The -ResourcePool parameter is auto-populated for command-line completion and can be used to copy only specific objects.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaResourceGovernor</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Specifies the resource pool(s) to process. Options for this list are auto-populated from the server. If unspecified, all resource pools will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeResourcePool</maml:name><maml:description><maml:para>Specifies the resource pool(s) to exclude. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the policies will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeResourcePool</maml:name><maml:description><maml:para>Specifies the resource pool(s) to exclude. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the policies will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Specifies the resource pool(s) to process. Options for this list are auto-populated from the server. If unspecified, all resource pools will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, ResourceGovernor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all all non-system resource pools from sqlserver2014a to sqlcluster using Windows credentials to connect to the SQL Server instances.. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all all non-system resource pools from sqlserver2014a to sqlcluster using SQL credentials to connect to sqlserver2014a and Windows credentials to connect to sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaResourceGovernor -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaResourceGovernor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaSpConfigure</command:name><command:noun>DbaSpConfigure</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaSpConfigure migrates configuration values from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaSpConfigure</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigName</maml:name><maml:description><maml:para>Specifies the configuration setting to process. Options for this list are auto-populated from the server. If unspecified, all ConfigNames will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeConfigName</maml:name><maml:description><maml:para>Specifies the configuration settings to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigName</maml:name><maml:description><maml:para>Specifies the configuration setting to process. Options for this list are auto-populated from the server. If unspecified, all ConfigNames will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeConfigName</maml:name><maml:description><maml:para>Specifies the configuration settings to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Configure, SpConfigure Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all sp_configure settings from sqlserver2014a to sqlcluster </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -ConfigName DefaultBackupCompression, IsSqlClrEnabled -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies the values for IsSqlClrEnabled and DefaultBackupCompression from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials to authenticate to sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -ExcludeConfigName DefaultBackupCompression, IsSqlClrEnabled </dev:code><dev:remarks><maml:para> Copies all configs except for IsSqlClrEnabled and DefaultBackupCompression, from sqlserver2014a to sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaSpConfigure -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaSpConfigure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaStartupProcedure</command:name><command:noun>DbaStartupProcedure</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaStartupProcedure migrates startup procedures (user defined procedures within master database) from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all procedures found flagged as startup procedures are copied and then set as a startup procedure on the destination instance. The -Procedure parameter is auto-populated for command-line completion and can be used to copy only specific startup procedures.</maml:para><maml:para>If the procedure already exists on the destination, it will be skipped unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaStartupProcedure</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Procedure</maml:name><maml:description><maml:para>The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedures will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProcedure</maml:name><maml:description><maml:para>The startup procedure(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the custom error will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProcedure</maml:name><maml:description><maml:para>The startup procedure(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the custom error will be dropped and recreated if it already exists on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Procedure</maml:name><maml:description><maml:para>The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedures will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Procedure, Startup, StartupProcedure Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaStartupProcedure -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all startup procedures from sqlserver2014a to sqlcluster using Windows credentials. If procedure(s) with the same name exists in the master database on sqlcluster, they will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaStartupProcedure -Source sqlserver2014a -SourceSqlCredential $scred -Destination sqlcluster -DestinationSqlCredential $dcred -Procedure logstartup -Force </dev:code><dev:remarks><maml:para> Copies only the startup procedure, logstartup, from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If the procedure already exists on sqlcluster, it will be updated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaStartupProcedure -Source sqlserver2014a -Destination sqlcluster -ExcludeProcedure logstartup -Force </dev:code><dev:remarks><maml:para> Copies all the startup procedures found on sqlserver2014a except logstartup to sqlcluster. If a startup procedure with the same name exists on sqlcluster, it will be updated because -Force was used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaStartupProcedure -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed using force. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaStartupProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaSysDbUserObject</command:name><command:noun>DbaSysDbUserObject</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Imports all user objects found in source SQL Server's master, msdb and model databases to the destination.</maml:para></maml:description></command:details><maml:description><maml:para>Imports all user objects found in source SQL Server's 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.</maml:para><maml:para>It is also useful for migrating objects within the model database.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaSysDbUserObject</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop destination objects first. Has no effect if you use Classic. This doesn't work really well, honestly.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Classic</maml:name><maml:description><maml:para>Perform the migration the old way</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Classic</maml:name><maml:description><maml:para>Perform the migration the old way</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop destination objects first. Has no effect if you use Classic. This doesn't work really well, honestly.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, SystemDatabase, UserObject Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaSysDbUserObject -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies user objects found in system databases master, msdb and model from sqlserver2014a instance to the sqlcluster instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaSysDbUserObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Migrates SQL Extended Event Sessions except the two default sessions, AlwaysOn_health and system_health.</maml:para></maml:description></command:details><maml:description><maml:para>Migrates SQL Extended Event Sessions except the two default sessions, AlwaysOn_health and system_health.</maml:para><maml:para>By default, all non-system Extended Events are migrated.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaXESession</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>XeSession</maml:name><maml:description><maml:para>The Extended Event Session(s) to process. This list is auto-populated from the server. If unspecified, all Extended Event Sessions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeXeSession</maml:name><maml:description><maml:para>The Extended Event Session(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing Extended Events sessions on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeXeSession</maml:name><maml:description><maml:para>The Extended Event Session(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, existing Extended Events sessions on Destination with matching names from Source will be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>XeSession</maml:name><maml:description><maml:para>The Extended Event Session(s) to process. This list is auto-populated from the server. If unspecified, all Extended Event Sessions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, ExtendedEvent, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESession -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all Extended Event sessions from sqlserver2014a to sqlcluster using Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESession -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> Copies all Extended Event sessions from sqlserver2014a to sqlcluster using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESession -Source sqlserver2014a -Destination sqlcluster -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESession -Source sqlserver2014a -Destination sqlcluster -XeSession CheckQueries, MonitorUserDefinedException </dev:code><dev:remarks><maml:para> Copies only the Extended Events named CheckQueries and MonitorUserDefinedException from sqlserver2014a to sqlcluster. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Copy-DbaXESessionTemplate</command:name><command:noun>DbaXESessionTemplate</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.</maml:para></maml:description></command:details><maml:description><maml:para>Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.</maml:para><maml:para>Useful for when you want to use the SSMS GUI.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaXESessionTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (/bin/XEtemplates/).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Path to the Destination directory, defaults to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Path to the Destination directory, defaults to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (/bin/XEtemplates/).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESessionTemplate </dev:code><dev:remarks><maml:para> Copies non-Microsoft templates from the dbatools template repository (/bin/XEtemplates/) to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Copy-DbaXESessionTemplate -Path C:\temp\XEtemplates </dev:code><dev:remarks><maml:para> Copies your templates from C:\temp\XEtemplates to $home\Documents\SQL Server Management Studio\Templates\XEventTemplates. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaXESessionTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaAgHadr</command:name><command:noun>DbaAgHadr</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disables the Hadr service setting on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>In order to build an AG a cluster has to be built and then the Hadr enabled for the SQL Server</maml:para><maml:para>service. This function disables that feature for the SQL Server service.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaAgHadr</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaAgHadr -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Sets Hadr service to disabled for the instance sql2016 but changes will not be applied until the next time the server restarts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaAgHadr -SqlInstance sql2016 -Force </dev:code><dev:remarks><maml:para> Sets Hadr service to disabled for the instance sql2016, and restart the service to apply the change. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaAgHadr -SqlInstance sql2012\dev1 -Force </dev:code><dev:remarks><maml:para> Sets Hadr service to disabled for the instance dev1 on sq2012, and restart the service to apply the change. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaAgHadr</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaDbEncryption</command:name><command:noun>DbaDbEncryption</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disables encryption on a database</maml:para></maml:description></command:details><maml:description><maml:para>Disables encryption on a database</maml:para><maml:para>Encryption is not fully disabled until the Encryption Key is dropped</maml:para><maml:para>Consequently, this command will drop the key by default</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaDbEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database that where encryption will be disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoEncryptionKeyDrop</maml:name><maml:description><maml:para>Encryption is not fully disabled until the Encryption Key is dropped. Consequently, Disable-DbaDbEncryption will drop the key by default. Use this to keep the encryption key. Note that if you keep your key, your database will not be fully decrypted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and disables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database that where encryption will be disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and disables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoEncryptionKeyDrop</maml:name><maml:description><maml:para>Encryption is not fully disabled until the Encryption Key is dropped. Consequently, Disable-DbaDbEncryption will drop the key by default. Use this to keep the encryption key. Note that if you keep your key, your database will not be fully decrypted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaDbEncryption -SqlInstance sql2017, sql2016 -Database pubs </dev:code><dev:remarks><maml:para> Disables database encryption on the pubs database on sql2017 and sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaDbEncryption -SqlInstance sql2017 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to disable database encryption on the db1 database on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database db1 | Disable-DbaDbEncryption -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to disable database encryption on the db1 database on sql2017 (using piping) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaDbEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaFilestream</command:name><command:noun>DbaFilestream</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Sets the status of FileStream on specified SQL Server instances both at the server level and the instance level</maml:para></maml:description></command:details><maml:description><maml:para>Connects to the specified SQL Server instances, and sets the status of the FileStream feature to the required value</maml:para><maml:para>To perform the action, the SQL Server instance must be restarted. By default we will prompt for confirmation for this action, this can be overridden with the -Force switch</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaFilestream</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Restart SQL Instance after changes. Use this parameter with care as it overrides whatif.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Restart SQL Instance after changes. Use this parameter with care as it overrides whatif.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Filestream Author: Stuart Moore (@napalmgram) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaFilestream -SqlInstance server1\instance2 </dev:code><dev:remarks><maml:para> Prompts for confirmation. Disables filestream on the service and instance levels. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaFilestream -SqlInstance server1\instance2 -Confirm:$false </dev:code><dev:remarks><maml:para> Does not prompt for confirmation. Disables filestream on the service and instance levels. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFilestream -SqlInstance server1\instance2, server5\instance5, prod\hr | Where-Object InstanceAccessLevel -gt 0 | Disable-DbaFilestream -Force </dev:code><dev:remarks><maml:para> Using this pipeline you can scan a range of SQL instances and disable filestream on only those on which it's enabled. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaFilestream</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaForceNetworkEncryption</command:name><command:noun>DbaForceNetworkEncryption</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disables Force Encryption for a SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Disables Force Encryption for a SQL Server instance. Note that this requires access to the Windows Server, not the SQL instance itself.</maml:para><maml:para>This setting is found in Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaForceNetworkEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaForceNetworkEncryption </dev:code><dev:remarks><maml:para> Disables Force Encryption on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaForceNetworkEncryption -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Disables Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaForceNetworkEncryption -SqlInstance sql01\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaForceNetworkEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaHideInstance</command:name><command:noun>DbaHideInstance</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disables the Hide Instance setting of the SQL Server network configuration.</maml:para></maml:description></command:details><maml:description><maml:para>Disables the Hide Instance setting of the SQL Server network configuration.</maml:para><maml:para>This requires access to the Windows Server and not the SQL Server instance. The setting is found in SQL Server Configuration Manager under the properties of SQL Server Network Configuration > Protocols for "InstanceName".</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaHideInstance</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Security Author: Gareth Newman (@gazeranco), ifexists.blog Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaHideInstance </dev:code><dev:remarks><maml:para> Disables Hide Instance of SQL Engine on the default (MSSQLSERVER) instance on localhost. Requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaHideInstance -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Disables Hide Instance of SQL Engine for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both connect and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaHideInstance -SqlInstance sql01\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaHideInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaStartupProcedure</command:name><command:noun>DbaStartupProcedure</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disables the automatic execution of procedure(s) that are set to execute automatically each time the SQL Server service is started</maml:para></maml:description></command:details><maml:description><maml:para>Used to revoke the designation of one or more stored procedures to automatically execute when the SQL Server service is started.</maml:para><maml:para>Equivalent to running the system stored procedure sp_procoption with @OptionValue = off</maml:para><maml:para>Returns the SMO StoredProcedure object for procedures affected.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaStartupProcedure</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>The Procedure(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped objects from Get-DbaStartup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped objects from Get-DbaStartup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>The Procedure(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Procedure, Startup, StartupProcedure Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaStartupProcedure -SqlInstance SqlBox1\Instance2 -StartupProcedure '[dbo].[StartUpProc1]' </dev:code><dev:remarks><maml:para> Attempts to clear the automatic execution of the procedure '[dbo].[StartUpProc1]' in the master database of SqlBox1\Instance2 when the instance is started. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Disable-DbaStartupProcedure -SqlInstance winserver\sqlexpress, sql2016 -SqlCredential $cred -StartupProcedure '[dbo].[StartUpProc1]' Attempts to clear the automatic execution of the procedure '[dbo].[StartUpProc1]' in the master database of winserver\sqlexpress and sql2016 when the instance is started. Connects using sqladmin credential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaStartupProcedure -SqlInstance sql2016 | Disable-DbaStartupProcedure </dev:code><dev:remarks><maml:para> Get all startup procedures for the sql2016 instance and disables them by piping to Disable-DbaStartupProcedure </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaStartupProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disable-DbaTraceFlag</command:name><command:noun>DbaTraceFlag</command:noun><command:verb>Disable</command:verb><maml:description><maml:para>Disable a Global Trace Flag that is currently running</maml:para></maml:description></command:details><maml:description><maml:para>The function will disable a Trace Flag that is currently running globally on the SQL Server instance(s) listed.</maml:para><maml:para>These are not persisted after a restart, use Set-DbaStartupParameter to set them to persist after restarts.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-DbaTraceFlag</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Trace flag number to enable globally</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Trace flag number to enable globally</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, TraceFlag, DBCC Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Disable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 3226 </dev:code><dev:remarks><maml:para> Disable the globally running trace flag 3226 on SQL Server instance sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disable-DbaTraceFlag</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Disconnect-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Disconnect</command:verb><maml:description><maml:para>Disconnects or closes a connection to a SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Disconnects or closes a connection to a SQL Server instance</maml:para><maml:para>To clear all of your connection pools, use Clear-DbaConnectionPool</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disconnect-DbaInstance</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The server object to disconnect from, usually piped in from Get-DbaConnectedInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The server object to disconnect from, usually piped in from Get-DbaConnectedInstance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaConnectedInstance | Disconnect-DbaInstance </dev:code><dev:remarks><maml:para> Disconnects all connected instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaConnectedInstance | Out-GridView -Passthru | Disconnect-DbaInstance </dev:code><dev:remarks><maml:para> Disconnects selected SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance sql01 </dev:code><dev:remarks><maml:para> PS C:\> $server | Disconnect-DbaInstance Disconnects the $server connection </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Disconnect-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Dismount-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Dismount</command:verb><maml:description><maml:para>Detach a SQL Server Database.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Dismount-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>If this switch is enabled, statistics for the database will be updated prior to detaching it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled and the database is part of a mirror, the mirror will be broken. If the database is part of an Availability Group, it will be removed from the AG.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Dismount-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to detach.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>If this switch is enabled, statistics for the database will be updated prior to detaching it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled and the database is part of a mirror, the mirror will be broken. If the database is part of an Availability Group, it will be removed from the AG.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Dismount-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be detached.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>If this switch is enabled, statistics for the database will be updated prior to detaching it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled and the database is part of a mirror, the mirror will be broken. If the database is part of an Availability Group, it will be removed from the AG.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to detach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled and the database is part of a mirror, the mirror will be broken. If the database is part of an Availability Group, it will be removed from the AG.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be detached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>If this switch is enabled, statistics for the database will be updated prior to detaching it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Detach, Database Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Detach-DbaDatabase -SqlInstance sql2016b -Database SharePoint_Config, WSS_Logging </dev:code><dev:remarks><maml:para> Detaches SharePoint_Config and WSS_Logging from sql2016b </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016b -Database 'PerformancePoint Service Application_10032db0fa0041df8f913f558a5dc0d4' | Detach-DbaDatabase -Force </dev:code><dev:remarks><maml:para> Detaches 'PerformancePoint Service Application_10032db0fa0041df8f913f558a5dc0d4' from sql2016b. Since Force was specified, if the database is part of mirror, the mirror will be broken prior to detaching. If the database is part of an Availability Group, it will first be dropped prior to detachment. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016b -Database WSS_Logging | Detach-DbaDatabase -Force -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were to execute (without actually executing the detach/break/remove commands). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Dismount-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaAgHadr</command:name><command:noun>DbaAgHadr</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enables the Hadr service setting on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>In order to build an AG a cluster has to be built and then the Hadr enabled for the SQL Server</maml:para><maml:para>service. This function enables that feature for the SQL Server service.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaAgHadr</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaAgHadr -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Sets Hadr service to enabled for the instance sql2016 but changes will not be applied until the next time the server restarts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaAgHadr -SqlInstance sql2016 -Force </dev:code><dev:remarks><maml:para> Sets Hadr service to enabled for the instance sql2016, and restart the service to apply the change. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaAgHadr -SqlInstance sql2012\dev1 -Force </dev:code><dev:remarks><maml:para> Sets Hadr service to disabled for the instance dev1 on sq2012, and restart the service to apply the change. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaAgHadr</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaDbEncryption</command:name><command:noun>DbaDbEncryption</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enables encryption on a database</maml:para></maml:description></command:details><maml:description><maml:para>Enables encryption on a database</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaDbEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database that where encryption will be enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>If an Encryption Key does not exist in the database, this command will attempt to create one. This parameter specifies the name of the certificate in master that should be used and tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default, this command will not encrypt a database unless the cert has been backed up Use Force to enable encryption even though the specified cert has not been backed up</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database that where encryption will be enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>If an Encryption Key does not exist in the database, this command will attempt to create one. This parameter specifies the name of the certificate in master that should be used and tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default, this command will not encrypt a database unless the cert has been backed up Use Force to enable encryption even though the specified cert has not been backed up</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaDbEncryption -SqlInstance sql2017, sql2016 -Database pubs </dev:code><dev:remarks><maml:para> Enables database encryption on the pubs database on sql2017 and sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaDbEncryption -SqlInstance sql2017 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to enable database encryption on the db1 database on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database db1 | Enable-DbaDbEncryption -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to enable database encryption on the db1 database on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaDbEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaFilestream</command:name><command:noun>DbaFilestream</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enables FileStream on specified SQL Server instances</maml:para></maml:description></command:details><maml:description><maml:para>Connects to the specified SQL Server instances, and Enables the FileStream feature to the required value</maml:para><maml:para>To perform the action, the SQL Server instance must be restarted. By default we will prompt for confirmation for this action, this can be overridden with the -Force switch</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaFilestream</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamLevel</maml:name><maml:description><maml:para>The level to of FileStream to be enabled: 1 or TSql - T-Sql Access Only 2 or TSqlIoStreaming - T-Sql and Win32 access enabled 3 or TSqlIoStreamingRemoteClient T-Sql, Win32 and Remote access enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShareName</maml:name><maml:description><maml:para>Specifies the Windows file share name to be used for storing the FILESTREAM data.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Restart SQL Instance after changes. Use this parameter with care as it overrides whatif.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamLevel</maml:name><maml:description><maml:para>The level to of FileStream to be enabled: 1 or TSql - T-Sql Access Only 2 or TSqlIoStreaming - T-Sql and Win32 access enabled 3 or TSqlIoStreamingRemoteClient T-Sql, Win32 and Remote access enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Restart SQL Instance after changes. Use this parameter with care as it overrides whatif.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShareName</maml:name><maml:description><maml:para>Specifies the Windows file share name to be used for storing the FILESTREAM data.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Filestream Author: Stuart Moore (@napalmgram) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaFilestream -SqlInstance server1\instance2 -FileStreamLevel TSql </dev:code><dev:remarks><maml:para> PS C:\> Enable-DbaFilestream -SqlInstance server1\instance2 -FileStreamLevel 1 These commands are functionally equivalent, both will set Filestream level on server1\instance2 to T-Sql Only </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFilestream -SqlInstance server1\instance2, server5\instance5, prod\hr | Where-Object InstanceAccessLevel -eq 0 | Enable-DbaFilestream -FileStreamLevel TSqlIoStreamingRemoteClient -Force </dev:code><dev:remarks><maml:para> Using this pipeline you can scan a range of SQL instances and enable filestream on only those on which it's disabled. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaFilestream</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaForceNetworkEncryption</command:name><command:noun>DbaForceNetworkEncryption</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enables Force Encryption for a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Enables Force Encryption for a SQL Server instance. Note that this requires access to the Windows Server, not the SQL instance itself.</maml:para><maml:para>This setting is found in Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaForceNetworkEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Encryption, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaForceNetworkEncryption </dev:code><dev:remarks><maml:para> Enables Force Encryption on the default (MSSQLSERVER) instance on localhost. Requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaForceNetworkEncryption -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Enables Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both connect and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaForceNetworkEncryption -SqlInstance sql01\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaForceNetworkEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaHideInstance</command:name><command:noun>DbaHideInstance</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enables the Hide Instance setting of the SQL Server network configuration.</maml:para></maml:description></command:details><maml:description><maml:para>Enables the Hide Instance setting of the SQL Server network configuration.</maml:para><maml:para>This setting requires access to the Windows Server and not the SQL Server instance. The setting is found in SQL Server Configuration Manager under the properties of SQL Server Network Configuration > Protocols for "InstanceName".</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaHideInstance</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Security Author: Gareth Newman (@gazeranco), ifexists.blog Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaHideInstance </dev:code><dev:remarks><maml:para> Enables Hide Instance of SQL Engine on the default (MSSQLSERVER) instance on localhost. Requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaHideInstance -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Enables Hide Instance of SQL Engine for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both connect and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaHideInstance -SqlInstance sql01\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaHideInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaStartupProcedure</command:name><command:noun>DbaStartupProcedure</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Sets a procedure to execute automatically each time the SQL Server service is started</maml:para></maml:description></command:details><maml:description><maml:para>Used to designate one or more stored procedures to automatically execute when the SQL Server service is started.</maml:para><maml:para>Equivalent to running the system stored procedure sp_procoption with @OptionValue = on</maml:para><maml:para>Returns the SMO StoredProcedure object for procedures affected.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaStartupProcedure</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>The Procedure(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>The Procedure(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Procedure, Startup, StartupProcedure Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaStartupProcedure -SqlInstance SqlBox1\Instance2 -StartupProcedure '[dbo].[StartUpProc1]' </dev:code><dev:remarks><maml:para> Attempts to set the procedure '[dbo].[StartUpProc1]' in the master database of SqlBox1\Instance2 for automatic execution when the instance is started. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Enable-DbaStartupProcedure -SqlInstance winserver\sqlexpress, sql2016 -SqlCredential $cred -StartupProcedure '[dbo].[StartUpProc1]' Attempts to set the procedure '[dbo].[StartUpProc1]' in the master database of winserver\sqlexpress and sql2016 for automatic execution when the instance is started. Connects using sqladmin credential </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaStartupProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Enable-DbaTraceFlag</command:name><command:noun>DbaTraceFlag</command:noun><command:verb>Enable</command:verb><maml:description><maml:para>Enable Global Trace Flag(s)</maml:para></maml:description></command:details><maml:description><maml:para>The function will set one or multiple trace flags on the SQL Server instance(s) listed.</maml:para><maml:para>These are not persisted after a restart, use Set-DbaStartupParameter to set them to persist after restarts.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-DbaTraceFlag</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Trace flag number(s) to enable globally</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Trace flag number(s) to enable globally</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, TraceFlag, DBCC Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 3226 </dev:code><dev:remarks><maml:para> Enable the trace flag 3226 on SQL Server instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Enable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 1117, 1118 </dev:code><dev:remarks><maml:para> Enable multiple trace flags on SQL Server instance sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Enable-DbaTraceFlag</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Expand-DbaDbLogFile</command:name><command:noun>DbaDbLogFile</command:noun><command:verb>Expand</command:verb><maml:description><maml:para>This command will help you to automatically grow your transaction log file in a responsible way (preventing the generation of too many VLFs).</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Example:</maml:para><maml:para>Too 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.</maml:para><maml:para>References:</maml:para><maml:para>http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/</maml:para><maml:para>http://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx</maml:para><maml:para>http://www.brentozar.com/blitz/high-virtual-log-file-vlf-count/</maml:para><maml:para>In order to get rid of this fragmentation we need to grow the file taking the following into consideration:</maml:para><maml:para>- How many VLFs are created when we perform a grow operation or when an auto-grow is invoked?</maml:para><maml:para>Note: In SQL Server 2014 this algorithm has changed (http://www.sqlskills.com/blogs/paul/important-change-vlf-creation-algorithm-sql-server-2014/)</maml:para><maml:para>Attention:</maml:para><maml:para>We are growing in MB instead of GB because of known issue prior to SQL 2012:</maml:para><maml:para>More detail here:</maml:para><maml:para>http://www.sqlskills.com/BLOGS/PAUL/post/Bug-log-file-growth-broken-for-multiples-of-4GB.aspx</maml:para><maml:para>and</maml:para><maml:para>http://connect.microsoft.com/SqlInstance/feedback/details/481594/log-growth-not-working-properly-with-specific-growth-sizes-vlfs-also-not-created-appropriately</maml:para><maml:para>or</maml:para><maml:para>https://connect.microsoft.com/SqlInstance/feedback/details/357502/transaction-log-file-size-will-not-grow-exactly-4gb-when-filegrowth-4gb</maml:para><maml:para>Understanding related problems:</maml:para><maml:para>http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/</maml:para><maml:para>http://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx</maml:para><maml:para>http://www.brentozar.com/blitz/high-virtual-log-file-vlf-count/</maml:para><maml:para>Known bug before SQL Server 2012</maml:para><maml:para>http://www.sqlskills.com/BLOGS/PAUL/post/Bug-log-file-growth-broken-for-multiples-of-4GB.aspx</maml:para><maml:para>http://connect.microsoft.com/SqlInstance/feedback/details/481594/log-growth-not-working-properly-with-specific-growth-sizes-vlfs-also-not-created-appropriately</maml:para><maml:para>https://connect.microsoft.com/SqlInstance/feedback/details/357502/transaction-log-file-size-will-not-grow-exactly-4gb-when-filegrowth-4gb</maml:para><maml:para>How it works?</maml:para><maml:para>The transaction log will grow in chunks until it reaches the desired size.</maml:para><maml:para>Example: 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 -> 16384 -> 24576 ... 73728 -> 81920</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Expand-DbaDbLogFile</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogSize</maml:name><maml:description><maml:para>Specifies the target size of the transaction log file in megabytes.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementSize</maml:name><maml:description><maml:para>Specifies the amount the transaction log should grow in megabytes. If this value differs from the suggested value based on your TargetLogSize, you will be prompted to confirm your choice. This value will be calculated if not specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileId</maml:name><maml:description><maml:para>Specifies the file number(s) of additional transaction log files to grow. If this value is not specified, only the first transaction log file will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDiskSpaceValidation</maml:name><maml:description><maml:para>If this switch is enabled, the validation for enough disk space using Get-DbaDiskSpace command will be skipped. This can be useful when you know that you have enough space to grow your TLog but you don't have PowerShell Remoting enabled to validate it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Expand-DbaDbLogFile</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogSize</maml:name><maml:description><maml:para>Specifies the target size of the transaction log file in megabytes.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementSize</maml:name><maml:description><maml:para>Specifies the amount the transaction log should grow in megabytes. If this value differs from the suggested value based on your TargetLogSize, you will be prompted to confirm your choice. This value will be calculated if not specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileId</maml:name><maml:description><maml:para>Specifies the file number(s) of additional transaction log files to grow. If this value is not specified, only the first transaction log file will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkLogFile</maml:name><maml:description><maml:para>If this switch is enabled, your transaction log files will be shrunk.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkSize</maml:name><maml:description><maml:para>Specifies the target size of the transaction log file for the shrink operation in megabytes.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupDirectory</maml:name><maml:description><maml:para>Specifies the location of your backups. Backups must be performed to shrink the transaction log. If this value is not specified, the SQL Server instance's default backup directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDiskSpaceValidation</maml:name><maml:description><maml:para>If this switch is enabled, the validation for enough disk space using Get-DbaDiskSpace command will be skipped. This can be useful when you know that you have enough space to grow your TLog but you don't have PowerShell Remoting enabled to validate it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupDirectory</maml:name><maml:description><maml:para>Specifies the location of your backups. Backups must be performed to shrink the transaction log. If this value is not specified, the SQL Server instance's default backup directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDiskSpaceValidation</maml:name><maml:description><maml:para>If this switch is enabled, the validation for enough disk space using Get-DbaDiskSpace command will be skipped. This can be useful when you know that you have enough space to grow your TLog but you don't have PowerShell Remoting enabled to validate it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementSize</maml:name><maml:description><maml:para>Specifies the amount the transaction log should grow in megabytes. If this value differs from the suggested value based on your TargetLogSize, you will be prompted to confirm your choice. This value will be calculated if not specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileId</maml:name><maml:description><maml:para>Specifies the file number(s) of additional transaction log files to grow. If this value is not specified, only the first transaction log file will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkLogFile</maml:name><maml:description><maml:para>If this switch is enabled, your transaction log files will be shrunk.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkSize</maml:name><maml:description><maml:para>Specifies the target size of the transaction log file for the shrink operation in megabytes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogSize</maml:name><maml:description><maml:para>Specifies the target size of the transaction log file in megabytes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, LogFile Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: ALTER DATABASE permission Limitations: Freespace cannot be validated on the directory where the log file resides in SQL Server 2005. This script uses Get-DbaDiskSpace dbatools command to get the TLog's drive free space </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Expand-DbaDbLogFile -SqlInstance sqlcluster -Database db1 -TargetLogSize 50000 </dev:code><dev:remarks><maml:para> Grows the transaction log for database db1 on sqlcluster to 50000 MB and calculates the increment size. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Expand-DbaDbLogFile -SqlInstance sqlcluster -Database db1, db2 -TargetLogSize 10000 -IncrementSize 200 </dev:code><dev:remarks><maml:para> Grows the transaction logs for databases db1 and db2 on sqlcluster to 1000MB and sets the growth increment to 200MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Expand-DbaDbLogFile -SqlInstance sqlcluster -Database db1 -TargetLogSize 10000 -LogFileId 9 </dev:code><dev:remarks><maml:para> Grows the transaction log file with FileId 9 of the db1 database on sqlcluster instance to 10000MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Expand-DbaDbLogFile -SqlInstance sqlcluster -Database (Get-Content D:\DBs.txt) -TargetLogSize 50000 </dev:code><dev:remarks><maml:para> Grows the transaction log of the databases specified in the file 'D:\DBs.txt' on sqlcluster instance to 50000MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Expand-DbaDbLogFile -SqlInstance SqlInstance -Database db1,db2 -TargetLogSize 100 -IncrementSize 10 -ShrinkLogFile -ShrinkSize 10 -BackupDirectory R:\MSSQL\Backup </dev:code><dev:remarks><maml:para> Grows 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:\MSSQL\Backup for the required backups. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Expand-DbaDbLogFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaBinaryFile</command:name><command:noun>DbaBinaryFile</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports binary files from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Exports binary files from SQL Server</maml:para><maml:para>If specific filename and binary columns aren't specified, the command will guess based on the datatype (binary/image) for the binary column and a match for "name" as the filename column.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaBinaryFile</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileNameColumn</maml:name><maml:description><maml:para>The column name that contains the filename. If not specified, we'll try out best to figure it out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BinaryColumn</maml:name><maml:description><maml:para>The column name that contains the binary data. If not specified, we'll try out best to figure it out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Allows you to specify a custom query to use to return the data. If not specified, we'll try out best to figure it out. Example query: "SELECT [fn], [data] FROM tempdb.dbo.files"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The specific filename of the output file. If not specified, the filename will use the filename column to determine the filename.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable or Get-DbaBinaryFileTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BinaryColumn</maml:name><maml:description><maml:para>The column name that contains the binary data. If not specified, we'll try out best to figure it out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileNameColumn</maml:name><maml:description><maml:para>The column name that contains the filename. If not specified, we'll try out best to figure it out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The specific filename of the output file. If not specified, the filename will use the filename column to determine the filename.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable or Get-DbaBinaryFileTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Allows you to specify a custom query to use to return the data. If not specified, we'll try out best to figure it out. Example query: "SELECT [fn], [data] FROM tempdb.dbo.files"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaBinaryFile -SqlInstance sqlcs -Database test -Path C:\temp\exports </dev:code><dev:remarks><maml:para> Exports all binary files from the test database on sqlcs to C:\temp\exports. Guesses the columns based on datatype and column name. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaBinaryFile -SqlInstance sqlcs -Database employees -Table photos -Path C:\temp\exports </dev:code><dev:remarks><maml:para> Exports all binary files from the photos table in the employees database on sqlcs to C:\temp\exports. Guesses the columns based on datatype and column name. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaBinaryFile -SqlInstance sqlcs -Database employees -Table photos -FileNameColumn fname -BinaryColumn data -Path C:\temp\exports </dev:code><dev:remarks><maml:para> Exports all binary files from the photos table in the employees database on sqlcs to C:\temp\exports. Uses the fname and data columns for the filename and binary data. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaBinaryFile -SqlInstance sqlcs -Database employees -Table photos -Query "SELECT [FileName], [Data] FROM [employees].[dbo].[photos] WHERE FirstName = 'Potato' and LastName = 'Qualitee'" -FilePath C:\temp\PotatoQualitee.jpg </dev:code><dev:remarks><maml:para> Exports the binary file from the photos table in the employees database on sqlcs to C:\temp\PotatoQualitee.jpg. Uses the query to determine the filename and binary data. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBinaryFileTable -SqlInstance sqlcs -Database test | Out-GridView -Passthru | Export-DbaBinaryFile -Path C:\temp </dev:code><dev:remarks><maml:para> Allows you to pick tables with columns to be exported by Export-DbaBinaryFile </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaBinaryFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaCredential</command:name><command:noun>DbaCredential</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports credentials INCLUDING PASSWORDS, unless specified otherwise, to sql file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports credentials INCLUDING PASSWORDS, unless specified otherwise, to sql file.</maml:para><maml:para>Requires remote Windows access if exporting the password.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaCredential</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>The credentials to export. If unspecified, all credentials will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target OS using alternative credentials. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the directory that will contain the exported sql file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The specific path to a file which will contain the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Exports the SQL credential without any sensitive information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow credentials to be piped in from Get-DbaCredential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Credential[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Credential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target OS using alternative credentials. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Exports the SQL credential without any sensitive information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The specific path to a file which will contain the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>The credentials to export. If unspecified, all credentials will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow credentials to be piped in from Get-DbaCredential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Credential[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Credential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the directory that will contain the exported sql file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Credential Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaCredential -SqlInstance sql2017 -Path C:\temp\cred.sql </dev:code><dev:remarks><maml:para> Exports credentials, including passwords, from sql2017 to the file C:\temp\cred.sql </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaCredential</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaDacPackage</command:name><command:noun>DbaDacPackage</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports a dacpac from a server.</maml:para></maml:description></command:details><maml:description><maml:para>Using SQLPackage, export a dacpac from an instance of SQL Server.</maml:para><maml:para>Note - Extract from SQL Server is notoriously flaky - for example if you have three part references to external databases it will not work.</maml:para><maml:para>For help with the extract action parameters and properties, refer to https://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaDacPackage</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacOption</maml:name><maml:description><maml:para>Export options for a corresponding export type. Can be created by New-DbaDacOption -Type Dacpac | Bacpac</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>List of the tables to include into the export. Should be provided as an array of strings: dbo.Table1, Table2, Schema1.Table3.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbaDacPackage</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtendedParameters</maml:name><maml:description><maml:para>Optional parameters used to extract the DACPAC. More information can be found at https://msdn.microsoft.com/en-us/library/hh550080.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtendedProperties</maml:name><maml:description><maml:para>Optional properties used to extract the DACPAC. More information can be found at https://msdn.microsoft.com/en-us/library/hh550080.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacOption</maml:name><maml:description><maml:para>Export options for a corresponding export type. Can be created by New-DbaDacOption -Type Dacpac | Bacpac</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtendedParameters</maml:name><maml:description><maml:para>Optional parameters used to extract the DACPAC. More information can be found at https://msdn.microsoft.com/en-us/library/hh550080.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtendedProperties</maml:name><maml:description><maml:para>Optional properties used to extract the DACPAC. More information can be found at https://msdn.microsoft.com/en-us/library/hh550080.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>List of the tables to include into the export. Should be provided as an array of strings: dbo.Table1, Table2, Schema1.Table3.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Dacpac, Deployment Author: Richie lee (@richiebzzzt) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config -FilePath C:\SharePoint_Config.dacpac </dev:code><dev:remarks><maml:para> Exports the dacpac for SharePoint_Config on sql2016 to C:\SharePoint_Config.dacpac </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Export </dev:code><dev:remarks><maml:para> PS C:\> $options.ExtractAllTableData = $true PS C:\> $options.CommandTimeout = 0 PS C:\> Export-DbaDacPackage -SqlInstance sql2016 -Database DB1 -DacOption $options Uses DacOption object to set the CommandTimeout to 0 then extracts the dacpac for DB1 on sql2016 to C:\Users\username\Documents\DbatoolsExport\sql2016-DB1-20201227140759-dacpackage.dacpac including all table data. As noted the generated filename will contain the server name, database name, and the current timestamp in the "%Y%m%d%H%M%S" format. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDacPackage -SqlInstance sql2016 -AllUserDatabases -ExcludeDatabase "DBMaintenance","DBMonitoring" -Path "C:\temp" </dev:code><dev:remarks><maml:para> Exports dacpac packages for all USER databases, excluding "DBMaintenance" & "DBMonitoring", on sql2016 and saves them to C:\temp. The generated filename(s) will contain the server name, database name, and the current timestamp in the "%Y%m%d%H%M%S" format. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $moreparams = "/OverwriteFiles:$true /Quiet:$true" </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config -Path C:\temp -ExtendedParameters $moreparams Using extended parameters to over-write the files and performs the extraction in quiet mode to C:\temp\sql2016-SharePoint_Config-20201227140759-dacpackage.dacpac. Uses command line instead of SMO behind the scenes. As noted the generated filename will contain the server name, database name, and the current timestamp in the "%Y%m%d%H%M%S" format. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaDacPackage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaDbRole</command:name><command:noun>DbaDbRole</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports database roles to a T-SQL file. Export includes Role creation, object permissions and Schema ownership.</maml:para></maml:description></command:details><maml:description><maml:para>Exports database roles to a T-SQL file. Export includes Role creation, object permissions and Schema ownership.</maml:para><maml:para>This command is based off of John Eisbrener's post "Fully Script out a MSSQL Database Role"</maml:para><maml:para>Reference: https://dbaeyes.wordpress.com/2013/04/19/fully-script-out-a-mssql-database-role/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaDbRole</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2005 and above supported. Any databases in CompatibilityLevel 80 or lower will be skipped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase and Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The Role(s) to process. If unspecified, all Roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The Role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all members of fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeRoleMember</maml:name><maml:description><maml:para>Include scripting of role members in script</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name, Database name and date is created. If more than one database or instance is input then this parameter should normally be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten. This takes precedence over Append switch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by FilePath. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by FilePath. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all members of fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The Role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name, Database name and date is created. If more than one database or instance is input then this parameter should normally be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeRoleMember</maml:name><maml:description><maml:para>Include scripting of role members in script</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase and Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten. This takes precedence over Append switch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The Role(s) to process. If unspecified, all Roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2005 and above supported. Any databases in CompatibilityLevel 80 or lower will be skipped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Export, Role Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sql2005 -Path C:\temp </dev:code><dev:remarks><maml:para> Exports all the Database Roles for SQL Server "sql2005" and writes them to the file "C:\temp\sql2005-logins.sql" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2014a -ExcludeRole realcajun -SqlCredential $scred -Path C:\temp\roles.sql -Append </dev:code><dev:remarks><maml:para> Authenticates to sqlserver2014a using SQL Authentication. Exports all roles except for realcajun to C:\temp\roles.sql, and appends to the file if it exists. If not, the file will be created. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2014a -Role realcajun,netnerds -Path C:\temp\roles.sql </dev:code><dev:remarks><maml:para> Exports ONLY roles netnerds and realcajun FROM sqlserver2014a to the file C:\temp\roles.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2014a -Role realcajun,netnerds -Database HR, Accounting </dev:code><dev:remarks><maml:para> Exports ONLY roles netnerds and realcajun FROM sqlserver2014a with the permissions on databases HR and Accounting </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2014a -Database HR, Accounting | Export-DbaDbRole </dev:code><dev:remarks><maml:para> Exports ONLY roles FROM sqlserver2014a with permissions on databases HR and Accounting </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbatoolsConfig -FullName formatting.batchseparator -Value $null </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaDbRole -SqlInstance sqlserver2008 -Role realcajun,netnerds -Path C:\temp\roles.sql Sets the BatchSeparator configuration to null, removing the default "GO" value. Exports ONLY roles netnerds and realcajun FROM sqlserver2008 server, to the C:\temp\roles.sql file, without the "GO" batch separator. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2008 -Role realcajun,netnerds -Path C:\temp\roles.sql -BatchSeparator $null </dev:code><dev:remarks><maml:para> Exports ONLY roles netnerds and realcajun FROM sqlserver2008 server, to the C:\temp\roles.sql file, without the "GO" batch separator. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2008 | Export-DbaDbRole -Role realcajun </dev:code><dev:remarks><maml:para> Exports role realcajun for all databases on sqlserver2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance sqlserver2008 -ExcludeFixedRole | Export-DbaDbRole </dev:code><dev:remarks><maml:para> Exports all roles from all databases on sqlserver2008, excludes all roles marked as as FixedRole </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaDbRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaDbTableData</command:name><command:noun>DbaDbTableData</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports data from tables</maml:para></maml:description></command:details><maml:description><maml:para>Exports data from tables</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaDbTableData</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Pipeline input from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: - ASCII: Uses the encoding for the ASCII (7-bit) character set. - BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. - Byte: Encodes a set of characters into a sequence of bytes. - String: Uses the encoding type for a string. - Unicode: Encodes in UTF-16 format using the little-endian byte order. - UTF7: Encodes in UTF-7 format. - UTF8: Encodes in UTF-8 format. - Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Specifies the Batch Separator to use. Default is None</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Specifies the Batch Separator to use. Default is None</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: - ASCII: Uses the encoding for the ASCII (7-bit) character set. - BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. - Byte: Encodes a set of characters into a sequence of bytes. - String: Uses the encoding type for a string. - Unicode: Encodes in UTF-16 format using the little-endian byte order. - UTF7: Encodes in UTF-7 format. - UTF8: Encodes in UTF-8 format. - Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Pipeline input from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql2017 -Database AdventureWorks2014 -Table EmployeePayHistory | Export-DbaDbTableData </dev:code><dev:remarks><maml:para> Exports data from EmployeePayHistory in AdventureWorks2014 in sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql2017 -Database AdventureWorks2014 -Table EmployeePayHistory | Export-DbaDbTableData -Path C:\temp\export.sql -Append </dev:code><dev:remarks><maml:para> Exports data from EmployeePayHistory in AdventureWorks2014 in sql2017 using a trusted connection - Will append the output to the file C:\temp\export.sql if it already exists Script does not include Batch Separator and will not compile </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql2016 -Database MyDatabase -Table 'dbo.Table1', 'dbo.Table2' -SqlCredential sqladmin | Export-DbaDbTableData -Path C:\temp\export.sql </dev:code><dev:remarks><maml:para> Exports only data from 'dbo.Table1' and 'dbo.Table2' in MyDatabase to C:\temp\export.sql and uses the SQL login "sqladmin" to login to sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaDbTableData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaDiagnosticQuery</command:name><command:noun>DbaDiagnosticQuery</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Export-DbaDiagnosticQuery can convert output generated by Invoke-DbaDiagnosticQuery to CSV or Excel</maml:para></maml:description></command:details><maml:description><maml:para>The default output format of Invoke-DbaDiagnosticQuery is a custom object. It can also output to CSV and Excel.</maml:para><maml:para>However, CSV output can generate a lot of files and Excel output depends on the ImportExcel module by Doug Finke (https://github.com/dfinke/ImportExcel)</maml:para><maml:para>Export-DbaDiagnosticQuery can be used to convert from the default export type to the other available export types.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaDiagnosticQuery</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies the objects to convert</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConvertTo</maml:name><maml:description><maml:para>Specifies the output type. Valid choices are Excel and CSV. CSV is the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the output files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>Suffix for the filename. It's datetime by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPlanExport</maml:name><maml:description><maml:para>Use this switch to suppress exporting of .sqlplan files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoQueryExport</maml:name><maml:description><maml:para>Use this switch to suppress exporting of .sql files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConvertTo</maml:name><maml:description><maml:para>Specifies the output type. Valid choices are Excel and CSV. CSV is the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies the objects to convert</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPlanExport</maml:name><maml:description><maml:para>Use this switch to suppress exporting of .sqlplan files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoQueryExport</maml:name><maml:description><maml:para>Use this switch to suppress exporting of .sql files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the output files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Suffix</maml:name><maml:description><maml:para>Suffix for the filename. It's datetime by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, GlennBerry Author: Andre Kamman (@AndreKamman), clouddba.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance sql2016 | Export-DbaDiagnosticQuery -Path c:\temp </dev:code><dev:remarks><maml:para> Converts output from Invoke-DbaDiagnosticQuery to multiple CSV files </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Invoke-DbaDiagnosticQuery -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaDiagnosticQuery -InputObject $output -ConvertTo Excel Converts output from Invoke-DbaDiagnosticQuery to Excel worksheet(s) in the Documents folder </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaDiagnosticQuery</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaExecutionPlan</command:name><command:noun>DbaExecutionPlan</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports execution plans to disk.</maml:para></maml:description></command:details><maml:description><maml:para>Exports execution plans to disk. Can pipe from Get-DbaExecutionPlan</maml:para><maml:para>Thanks to</maml:para><maml:para>https://www.simple-talk.com/sql/t-sql-programming/dmvs-for-query-plan-metadata/</maml:para><maml:para>and</maml:para><maml:para>http://www.scarydba.com/2017/02/13/export-plans-cache-sqlplan-file/</maml:para><maml:para>for the idea and query.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaExecutionPlan</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbaExecutionPlan</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory where all of the sqlxml files will be exported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceCreation</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceLastExecution</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbaExecutionPlan</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory where all of the sqlxml files will be exported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory where all of the sqlxml files will be exported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceCreation</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceLastExecution</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Performance, ExecutionPlan Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaExecutionPlan -SqlInstance sqlserver2014a -Path C:\Temp </dev:code><dev:remarks><maml:para> Exports all execution plans for sqlserver2014a. Files saved in to C:\Temp </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaExecutionPlan -SqlInstance sqlserver2014a -Database db1, db2 -SinceLastExecution '2016-07-01 10:47:00' -Path C:\Temp </dev:code><dev:remarks><maml:para> Exports all execution plans for databases db1 and db2 on sqlserver2014a since July 1, 2016 at 10:47 AM. Files saved in to C:\Temp </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sqlserver2014a | Export-DbaExecutionPlan -Path C:\Temp </dev:code><dev:remarks><maml:para> Gets all execution plans for sqlserver2014a. Using Pipeline exports them all to C:\Temp </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sqlserver2014a | Export-DbaExecutionPlan -Path C:\Temp -WhatIf </dev:code><dev:remarks><maml:para> Gets all execution plans for sqlserver2014a. Then shows what would happen if the results where piped to Export-DbaExecutionPlan </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaExecutionPlan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports SQL Server *ALL* database restore scripts, logins, database mail profiles/accounts, credentials, SQL Agent objects, linked servers, Central Management Server objects, server configuration settings (sp_configure), user objects in systems databases, system triggers and backup devices from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>Export-DbaInstance consolidates most of the export scripts in dbatools into one command.</maml:para><maml:para>This is useful when you're looking to Export entire instances. It less flexible than using the underlying functions.</maml:para><maml:para>Think of it as an easy button. Unless an -Exclude is specified, it exports:</maml:para><maml:para>All database 'restore from backup' scripts. Note: if a database does not have a backup the 'restore from backup' script won't be generated.</maml:para><maml:para>All logins.</maml:para><maml:para>All database mail objects.</maml:para><maml:para>All credentials.</maml:para><maml:para>All objects within the Job Server (SQL Agent).</maml:para><maml:para>All linked servers.</maml:para><maml:para>All groups and servers within Central Management Server.</maml:para><maml:para>All SQL Server configuration objects (everything in sp_configure).</maml:para><maml:para>All user objects in system databases.</maml:para><maml:para>All system triggers.</maml:para><maml:para>All system backup devices.</maml:para><maml:para>All Audits.</maml:para><maml:para>All Endpoints.</maml:para><maml:para>All Extended Events.</maml:para><maml:para>All Policy Management objects.</maml:para><maml:para>All Resource Governor objects.</maml:para><maml:para>All Server Audit Specifications.</maml:para><maml:para>All Custom Errors (User Defined Messages).</maml:para><maml:para>All Server Roles.</maml:para><maml:para>All Availability Groups.</maml:para><maml:para>All OLEDB Providers.</maml:para><maml:para>The exported files are written to a folder with a naming convention of "machinename$instance-yyyyMMddHHmmss".</maml:para><maml:para>This command supports the following use cases related to the output files:</maml:para><maml:para>1. Export files to a new timestamped folder. This is the default behavior and results in a simple historical archive within the local filesystem.</maml:para><maml:para>2. Export files to an existing folder and overwrite pre-existing files. This can be accomplished using the -Force parameter.</maml:para><maml:para>This results in a single folder location with the latest exported files. These files can then be checked into a source control system if needed.</maml:para><maml:para>For more granular control, please use one of the -Exclude parameters and use the other functions available within the dbatools module.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaInstance</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternative Windows credentials for exporting Linked Servers and Credentials. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is used, databases will be left in the No Recovery state to enable further backups to be added.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Optional AzureCredential to connect to blob storage holding the backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDbMasterKey</maml:name><maml:description><maml:para>Exports the db master key then logs into the server to copy it to the $Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to export Databases Logins AgentServer Credentials LinkedServers SpConfigure CentralManagementServer DatabaseMail SysDbUserObjects SystemTriggers BackupDevices Audits Endpoints ExtendedEvents PolicyManagement ResourceGovernor ServerAuditSpecifications CustomErrors ServerRoles AvailabilityGroups ReplicationSettings OleDbProvider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. "GO" by default based on (Get-DbatoolsConfigValue -FullName 'formatting.batchseparator').</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Add scripting options to scripting output for all objects except Registered Servers and Extended Events.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include passwords for Credentials, LinkedServers or Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overwrite files in the location specified by -Path. Note: The Server Name is used when creating the folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Optional AzureCredential to connect to blob storage holding the backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. "GO" by default based on (Get-DbatoolsConfigValue -FullName 'formatting.batchseparator').</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternative Windows credentials for exporting Linked Servers and Credentials. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to export Databases Logins AgentServer Credentials LinkedServers SpConfigure CentralManagementServer DatabaseMail SysDbUserObjects SystemTriggers BackupDevices Audits Endpoints ExtendedEvents PolicyManagement ResourceGovernor ServerAuditSpecifications CustomErrors ServerRoles AvailabilityGroups ReplicationSettings OleDbProvider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include passwords for Credentials, LinkedServers or Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overwrite files in the location specified by -Path. Note: The Server Name is used when creating the folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDbMasterKey</maml:name><maml:description><maml:para>Exports the db master key then logs into the server to copy it to the $Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is used, databases will be left in the No Recovery state to enable further backups to be added.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Add scripting options to scripting output for all objects except Registered Servers and Extended Events.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaInstance -SqlInstance sqlserver\instance </dev:code><dev:remarks><maml:para> All databases, logins, job objects and sp_configure options will be exported from sqlserver\instance to an automatically generated folder name in Documents. For example, %userprofile%\Documents\DbatoolsExport\sqldev1$sqlcluster-20201108140000 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaInstance -SqlInstance sqlcluster -Exclude Databases, Logins -Path C:\dr\sqlcluster </dev:code><dev:remarks><maml:para> Exports everything but logins and database restore scripts to a folder such as C:\dr\sqlcluster\sqldev1$sqlcluster-20201108140000 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaInstance -SqlInstance sqlcluster -Path C:\servers\ -NoPrefix </dev:code><dev:remarks><maml:para> Exports everything to a folder such as C:\servers\sqldev1$sqlcluster-20201108140000 but scripts will not include prefix information. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaInstance -SqlInstance sqlcluster -Path C:\servers\ -Force </dev:code><dev:remarks><maml:para> Exports everything to a folder such as C:\servers\sqldev1$sqlcluster and will overwrite/refresh existing files in that folder. Note: when the -Force param is used the generated folder name will not include a timestamp. This supports the use case of running Export-DbaInstance on a schedule and writing to the same dir each time. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaLinkedServer</command:name><command:noun>DbaLinkedServer</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports linked servers INCLUDING PASSWORDS, unless specified otherwise, to sql file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports linked servers INCLUDING PASSWORDS, unless specified otherwise, to sql file.</maml:para><maml:para>Requires remote Windows access if exporting the password.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaLinkedServer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to export. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target OS using alternative linked servers. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Exports the linked server without any sensitive information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow credentials to be piped in from Get-DbaLinkedServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LinkedServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LinkedServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to Path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target OS using alternative linked servers. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>Exports the linked server without any sensitive information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow credentials to be piped in from Get-DbaLinkedServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LinkedServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LinkedServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to export. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLinkedServer -SqlInstance sql2017 -Path C:\temp\ls.sql </dev:code><dev:remarks><maml:para> Exports the linked servers, including passwords, from sql2017 to the file C:\temp\ls.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLinkedServer -SqlInstance sql2017 -Path C:\temp\ls.sql -ExcludePassword </dev:code><dev:remarks><maml:para> Exports the linked servers, without passwords, from sql2017 to the file C:\temp\ls.sql </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaLinkedServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Export</command:verb><maml:description><maml:para>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.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase, Get-DbaLogin and more.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobs</maml:name><maml:description><maml:para>If this switch is enabled, Agent job ownership will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>If this switch is enabled, mappings for databases will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>If this switch is enabled, hashed passwords will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>If this switch is enabled, all logins will be scripted with specified default database, that could help to successfully import logins on server that is missing default database for login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name and date is created. If more than one instance is input then this parameter should be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by Path. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationVersion</maml:name><maml:description><maml:para>To say to which version the script should be generated. If not specified will use instance major version.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by Path. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>If this switch is enabled, all logins will be scripted with specified default database, that could help to successfully import logins on server that is missing default database for login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationVersion</maml:name><maml:description><maml:para>To say to which version the script should be generated. If not specified will use instance major version.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>If this switch is enabled, mappings for databases will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobs</maml:name><maml:description><maml:para>If this switch is enabled, Agent job ownership will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePassword</maml:name><maml:description><maml:para>If this switch is enabled, hashed passwords will not be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name and date is created. If more than one instance is input then this parameter should be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase, Get-DbaLogin and more.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectLevel</maml:name><maml:description><maml:para>Include object-level permissions for each user associated with copied login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Export, Login Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sql2005 -Path C:\temp\sql2005-logins.sql </dev:code><dev:remarks><maml:para> Exports the logins for SQL Server "sql2005" and writes them to the file "C:\temp\sql2005-logins.sql" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sqlserver2014a -ExcludeLogin realcajun -SqlCredential $scred -Path C:\temp\logins.sql -Append </dev:code><dev:remarks><maml:para> Authenticates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sqlserver2014a -Login realcajun, netnerds -Path C:\temp\logins.sql </dev:code><dev:remarks><maml:para> Exports ONLY logins netnerds and realcajun FROM sqlserver2014a to the file C:\temp\logins.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sqlserver2014a -Login realcajun, netnerds -Database HR, Accounting </dev:code><dev:remarks><maml:para> Exports ONLY logins netnerds and realcajun FROM sqlserver2014a with the permissions on databases HR and Accounting </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2014a -Database HR, Accounting | Export-DbaLogin </dev:code><dev:remarks><maml:para> Exports ONLY logins FROM sqlserver2014a with permissions on databases HR and Accounting </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbatoolsConfig -FullName formatting.batchseparator -Value $null </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaLogin -SqlInstance sqlserver2008 -Login realcajun, netnerds -Path C:\temp\login.sql Exports ONLY logins netnerds and realcajun FROM sqlserver2008 server, to the C:\temp\login.sql file without the 'GO' batch separator. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sqlserver2008 -Login realcajun -Path C:\temp\users.sql -DestinationVersion SQLServer2016 </dev:code><dev:remarks><maml:para> Exports login realcajun from sqlserver2008 to the file C:\temp\users.sql with syntax to run on SQL Server 2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2008 -Login realcajun | Export-DbaLogin </dev:code><dev:remarks><maml:para> Exports login realcajun from sqlserver2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sqlserver2008, sqlserver2012 | Where-Object { $_.IsDisabled -eq $false } | Export-DbaLogin </dev:code><dev:remarks><maml:para> Exports all enabled logins from sqlserver2008 and sqlserver2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaPfDataCollectorSetTemplate</command:name><command:noun>DbaPfDataCollectorSetTemplate</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports a new Data Collector Set XML Template.</maml:para></maml:description></command:details><maml:description><maml:para>Exports a Data Collector Set XML Template from Get-DbaPfDataCollectorSet. Exports to "$home\Documents\Performance Monitor Templates" by default.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaPfDataCollectorSetTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the collector set(s) to export.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSetTemplate via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the collector set(s) to export.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSetTemplate via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Path C:\temp\pf </dev:code><dev:remarks><maml:para> Exports all data collector sets from to the C:\temp\pf folder. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet ComputerName sql2017 -CollectorSet 'System Correlation' | Export-DbaPfDataCollectorSetTemplate -Path C:\temp </dev:code><dev:remarks><maml:para> Exports the 'System Correlation' data collector set from sql2017 to C:\temp. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaPfDataCollectorSetTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports registered servers and registered server groups to file</maml:para></maml:description></command:details><maml:description><maml:para>Exports registered servers and registered server groups to file</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaRegServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaRegServer, Get-DbaRegServerGroup, CSVs and other objects. If importing from CSV or other object, a column named ServerName is required. Optional columns include Name, Description and Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. The file must end with .xml or .regsrvr</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CredentialPersistenceType</maml:name><maml:description><maml:para>Used to specify how the login and passwords are persisted. Valid values include None, PersistLoginName and PersistLoginNameAndPassword.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Overwrite</maml:name><maml:description><maml:para>Specifies to overwrite the output file (FilePath) if it already exists.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CredentialPersistenceType</maml:name><maml:description><maml:para>Used to specify how the login and passwords are persisted. Valid values include None, PersistLoginName and PersistLoginNameAndPassword.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. The file must end with .xml or .regsrvr</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaRegServer, Get-DbaRegServerGroup, CSVs and other objects. If importing from CSV or other object, a column named ServerName is required. Optional columns include Name, Description and Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Overwrite</maml:name><maml:description><maml:para>Specifies to overwrite the output file (FilePath) if it already exists.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaRegServer -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> Exports all Registered Server and Registered Server Groups on sql2008 to an automatically generated file name in the current directory </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2008, sql2012 | Export-DbaRegServer </dev:code><dev:remarks><maml:para> Exports all registered servers on sql2008 and sql2012. Warning - each one will have its own individual file. Consider piping groups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sql2008, sql2012 | Export-DbaRegServer </dev:code><dev:remarks><maml:para> Exports all registered servers on sql2008 and sql2012, organized by group. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaRepServerSetting</command:name><command:noun>DbaRepServerSetting</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports replication server settings to file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports replication server settings to file.</maml:para><maml:para>All replication commands need SQL Server Management Studio installed and are therefore currently not supported.</maml:para><maml:para>Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaRepServerSetting</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOption</maml:name><maml:description><maml:para>Not real sure how to use this yet</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaRepServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaRepServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOption</maml:name><maml:description><maml:para>Not real sure how to use this yet</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Replication Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaRepServerSetting -SqlInstance sql2017 -Path C:\temp\replication.sql </dev:code><dev:remarks><maml:para> Exports the replication settings on sql2017 to the file C:\temp\replication.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepServer -SqlInstance sql2017 | Export-DbaRepServerSettings -Path C:\temp\replication.sql </dev:code><dev:remarks><maml:para> Exports the replication settings on sql2017 to the file C:\temp\replication.sql </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaRepServerSetting</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaScript</command:name><command:noun>DbaScript</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports scripts from SQL Management Objects (SMO)</maml:para></maml:description></command:details><maml:description><maml:para>Exports scripts from SQL Management Objects</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaScript</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A SQL Management Object such as the one returned from Get-DbaLogin</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption Options set in the ScriptingOptionsObject may override other parameter values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Specifies the Batch Separator to use. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Specifies the Batch Separator to use. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A SQL Management Object such as the one returned from Get-DbaLogin</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption Options set in the ScriptingOptionsObject may override other parameter values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript </dev:code><dev:remarks><maml:para> Exports all jobs on the SQL Server sql2016 instance using a trusted connection - automatically determines filename based on the Path.DbatoolsExport configuration setting, current time and server name. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript -FilePath C:\temp\export.sql -Append </dev:code><dev:remarks><maml:para> Exports 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 Inclusion of Batch Separator in script depends on the configuration s not include Batch Separator and will not compile </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql2016 -Database MyDatabase -Table 'dbo.Table1', 'dbo.Table2' -SqlCredential sqladmin | Export-DbaScript -FilePath C:\temp\export.sql </dev:code><dev:remarks><maml:para> Exports only script for 'dbo.Table1' and 'dbo.Table2' in MyDatabase to C:temp\export.sql and uses the SQL login "sqladmin" to login to sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 -Job syspolicy_purge_history, 'Hourly Log Backups' -SqlCredential sqladmin | Export-DbaScript -FilePath C:\temp\export.sql -NoPrefix </dev:code><dev:remarks><maml:para> Exports only syspolicy_purge_history and 'Hourly Log Backups' to C:temp\export.sql and uses the SQL login "sqladmin" to login to sql2016 Suppress the output of a Prefix </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\> $options.ScriptSchema = $true PS C:\> $options.IncludeDatabaseContext = $true PS C:\> $options.IncludeHeaders = $false PS C:\> $Options.NoCommandTerminator = $false PS C:\> $Options.ScriptBatchTerminator = $true PS C:\> $Options.AnsiFile = $true PS C:\> Get-DbaAgentJob -SqlInstance sql2016 -Job syspolicy_purge_history, 'Hourly Log Backups' -SqlCredential sqladmin | Export-DbaScript -FilePath C:\temp\export.sql -ScriptingOptionsObject $options Exports only syspolicy_purge_history and 'Hourly Log Backups' to C:temp\export.sql and uses the SQL login "sqladmin" to login to sql2016 Uses Scripting options to ensure Batch Terminator is set </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2014 | Export-DbaScript -Passthru | ForEach-Object { $_.Replace('sql2014','sql2016') } | Set-Content -Path C:\temp\export.sql </dev:code><dev:remarks><maml:para> Exports jobs and replaces all instances of the servername "sql2014" with "sql2016" then writes to C:\temp\export.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\> $options.ScriptSchema = $true PS C:\> $options.IncludeDatabaseContext = $true PS C:\> $options.IncludeHeaders = $false PS C:\> $Options.NoCommandTerminator = $false PS C:\> $Options.ScriptBatchTerminator = $true PS C:\> $Options.AnsiFile = $true PS C:\> $Databases = Get-DbaDatabase -SqlInstance sql2016 -ExcludeDatabase master, model, msdb, tempdb PS C:\> foreach ($db in $Databases) { >> Export-DbaScript -InputObject $db -FilePath C:\temp\export.sql -Append -Encoding UTF8 -ScriptingOptionsObject $options -NoPrefix >> } Exports Script for each database on sql2016 excluding system databases Uses Scripting options to ensure Batch Terminator is set Will append the output to the file C:\temp\export.sql if it already exists </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaScript</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaServerRole</command:name><command:noun>DbaServerRole</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports server roles to a T-SQL file. Export includes Role creation, object permissions and Schema ownership.</maml:para></maml:description></command:details><maml:description><maml:para>Exports Server roles to a T-SQL file. Export includes Role creation, object permissions and Role Members</maml:para><maml:para>Applies mostly to SQL Server 2012 or Higher when user defined Server roles were added but can be used on earlier versions to get role members.</maml:para><maml:para>This command is an extension of John Eisbrener's post "Fully Script out a MSSQL Database Role"</maml:para><maml:para>Reference: https://dbaeyes.wordpress.com/2013/04/19/fully-script-out-a-mssql-database-role/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaServerRole</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaServerRole</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role(s) to filter results to that role only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>Server-Level role(s) to exclude from results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. As only SQL Server 2012 or higher supports creation of server-level roles will eliminate all output for earlier versions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeRoleMember</maml:name><maml:description><maml:para>Include scripting of role members in script</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name, Database name and date is created. If more than one database or instance is input then this parameter should normally be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten. This takes precedence over Append switch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by FilePath. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to a file already existing at the path specified by FilePath. If the file does not exist, it will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. As only SQL Server 2012 or higher supports creation of server-level roles will eliminate all output for earlier versions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>Server-Level role(s) to exclude from results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If left blank then filename based on Instance name, Database name and date is created. If more than one database or instance is input then this parameter should normally be blank.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeRoleMember</maml:name><maml:description><maml:para>Include scripting of role members in script</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaServerRole</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, a file already existing at the path specified by Path will not be overwritten. This takes precedence over Append switch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>Do not include a Prefix</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>An SMO Scripting Object that can be used to customize the output - see New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role(s) to filter results to that role only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Export, Role Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaServerRole -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Exports the Server Roles for SQL Server "sql2005" and writes them to the path defined in the ConfigValue 'Path.DbatoolsExport' using a a default name pattern of ServerName-YYYYMMDDhhmmss-serverrole. Uses BatchSeparator defined by Config 'Formatting.BatchSeparator' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaServerRole -SqlInstance sql2005 -Path C:\temp </dev:code><dev:remarks><maml:para> Exports the Server Roles for SQL Server "sql2005" and writes them to the path "C:\temp" using a a default name pattern of ServerName-YYYYMMDDhhmmss-serverrole. Uses BatchSeparator defined by Config 'Formatting.BatchSeparator' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaServerRole -SqlInstance sqlserver2014a -FilePath C:\temp\ServerRoles.sql </dev:code><dev:remarks><maml:para> Exports the Server Roles for SQL Server sqlserver2014a to the file C:\temp\ServerRoles.sql. Overwrites file if exists </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaServerRole -SqlInstance sqlserver2014a -ServerRole SchemaReader -Passthru </dev:code><dev:remarks><maml:para> Exports ONLY ServerRole SchemaReader FROM sqlserver2014a and writes script to console </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaServerRole -SqlInstance sqlserver2008 -ExcludeFixedRole -ExcludeServerRole Public -IncludeRoleMember -FilePath C:\temp\ServerRoles.sql -Append -BatchSeparator '' </dev:code><dev:remarks><maml:para> Exports server roles from sqlserver2008, excludes all roles marked as as FixedRole and Public role. Includes RoleMembers and writes to file C:\temp\ServerRoles.sql, appending to file if it exits. Does not include a BatchSeparator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRole -SqlInstance sqlserver2012, sqlserver2014 | Export-DbaServerRole </dev:code><dev:remarks><maml:para> Exports server roles from sqlserver2012, sqlserver2014 and writes them to the path defined in the ConfigValue 'Path.DbatoolsExport' using a a default name pattern of ServerName-YYYYMMDDhhmmss-serverrole </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRole -SqlInstance sqlserver2016 -ExcludeFixedRole -ExcludeServerRole Public | Export-DbaServerRole -IncludeRoleMember </dev:code><dev:remarks><maml:para> Exports server roles from sqlserver2016, excludes all roles marked as as FixedRole and Public role. Includes RoleMembers </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaServerRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaSpConfigure</command:name><command:noun>DbaSpConfigure</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports advanced sp_configure global configuration options to sql file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports advanced sp_configure global configuration options to sql file.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaSpConfigure</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input. You must have sysadmin access if needs to set 'show advanced options' to 1 and server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input. You must have sysadmin access if needs to set 'show advanced options' to 1 and server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>A DbaInstanceParameter representing an array of SQL Server instances.</maml:name><maml:uri /><maml:description /></dev:type></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Creates a new file for each SQL Server Instance</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SpConfig, Configure, Configuration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaSpConfigure -SqlInstance sourceserver </dev:code><dev:remarks><maml:para> Exports 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaSpConfigure -SqlInstance sourceserver -Path C:\temp </dev:code><dev:remarks><maml:para> Exports the SPConfigure settings on sourceserver to the directory C:\temp using the default name format </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaSpConfigure -SqlInstance sourceserver -SqlCredential $cred -Path C:\temp\sp_configure.sql Exports 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 'show advanced options' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Server1', 'Server2' | Export-DbaSpConfigure -Path C:\temp\configure.sql </dev:code><dev:remarks><maml:para> Exports 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 C:\temp\Servername-MMDDYYYYhhmmss-configure.sql </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaSpConfigure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaSysDbUserObject</command:name><command:noun>DbaSysDbUserObject</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports all user objects found in source SQL Server's master, msdb and model databases to the FilePath.</maml:para></maml:description></command:details><maml:description><maml:para>Exports all user objects found in source SQL Server's master, msdb and model databases to the FilePath.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaSysDbUserObject</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDependencies</maml:name><maml:description><maml:para>Specifies whether dependent objects are also scripted out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. "GO" by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>Add scripting options to scripting output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Output script to console.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. "GO" by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDependencies</maml:name><maml:description><maml:para>Specifies whether dependent objects are also scripted out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Output script to console.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>Add scripting options to scripting output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Export, Object, SystemDatabase Author: Jess Pomfret (@jpomfret) Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaSysDbUserObject -SqlInstance server1 </dev:code><dev:remarks><maml:para> Exports any user objects that are in the system database to the default location. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaSysDbUserObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports configuration items to a Json file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports configuration items to a Json file.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their full name.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutPath</maml:name><maml:description><maml:para>The path (filename included) to export to. Will fail if the folder does not exist, will overwrite the file if it exists.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipUnchanged</maml:name><maml:description><maml:para>If set, configuration objects whose value was not changed from its original value will not be exported. (Note: Settings that were updated with the same value as the original default will still be considered changed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their module name.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutPath</maml:name><maml:description><maml:para>The path (filename included) to export to. Will fail if the folder does not exist, will overwrite the file if it exists.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipUnchanged</maml:name><maml:description><maml:para>If set, configuration objects whose value was not changed from its original value will not be exported. (Note: Settings that were updated with the same value as the original default will still be considered changed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The configuration object(s) to export. Returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutPath</maml:name><maml:description><maml:para>The path (filename included) to export to. Will fail if the folder does not exist, will overwrite the file if it exists.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipUnchanged</maml:name><maml:description><maml:para>If set, configuration objects whose value was not changed from its original value will not be exported. (Note: Settings that were updated with the same value as the original default will still be considered changed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Export-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Exports all configuration pertinent to a module to a predefined path. Exported configuration items include all settings marked as 'ModuleExport' that have been changed from the default value.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleVersion</maml:name><maml:description><maml:para>The configuration version of the module-settings to write.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Which predefined path to write module specific settings to. Only file scopes are considered. By default it writes to the suer profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipUnchanged</maml:name><maml:description><maml:para>If set, configuration objects whose value was not changed from its original value will not be exported. (Note: Settings that were updated with the same value as the original default will still be considered changed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The configuration object(s) to export. Returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their full name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their module name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Exports all configuration pertinent to a module to a predefined path. Exported configuration items include all settings marked as 'ModuleExport' that have been changed from the default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleVersion</maml:name><maml:description><maml:para>The configuration version of the module-settings to write.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Select the configuration objects to export by filtering by their name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutPath</maml:name><maml:description><maml:para>The path (filename included) to export to. Will fail if the folder does not exist, will overwrite the file if it exists.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Which predefined path to write module specific settings to. Only file scopes are considered. By default it writes to the suer profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipUnchanged</maml:name><maml:description><maml:para>If set, configuration objects whose value was not changed from its original value will not be exported. (Note: Settings that were updated with the same value as the original default will still be considered changed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig | Export-DbatoolsConfig -OutPath '~/export.json' </dev:code><dev:remarks><maml:para> Exports all current settings to json. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbatoolsConfig -Module message -OutPath '~/export.json' -SkipUnchanged </dev:code><dev:remarks><maml:para> Exports all settings of the module 'message' that are no longer the original default values to json. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaUser</command:name><command:noun>DbaUser</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports users creation and its permissions to a T-SQL file or host.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaUser</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows database objects to be piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all InputObject will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Export only the specified database user(s). If not specified will export all users from the database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationVersion</maml:name><maml:description><maml:para>To say to which version the script should be generated. If not specified will use database compatibility level</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console, useful with | clip</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Script user as a templated string that contains tokens {templateUser} and {templateLogin} instead of username and login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>A Microsoft.SqlServer.Management.Smo.ScriptingOptions object with the options that you want to use to generate the t-sql script. You can use the New-DbaScriptingOption to generate it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGoBatchSeparator</maml:name><maml:description><maml:para>If specified, will NOT script the 'GO' batch separator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all InputObject will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationVersion</maml:name><maml:description><maml:para>To say to which version the script should be generated. If not specified will use database compatibility level</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGoBatchSeparator</maml:name><maml:description><maml:para>If specified, will NOT script the 'GO' batch separator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows database objects to be piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console, useful with | clip</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOptionsObject</maml:name><maml:description><maml:para>A Microsoft.SqlServer.Management.Smo.ScriptingOptions object with the options that you want to use to generate the t-sql script. You can use the New-DbaScriptingOption to generate it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2000 and above supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Script user as a templated string that contains tokens {templateUser} and {templateLogin} instead of username and login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Export only the specified database user(s). If not specified will export all users from the database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.String</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: User, Export Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sql2005 -FilePath C:\temp\sql2005-users.sql </dev:code><dev:remarks><maml:para> Exports SQL for the users in server "sql2005" and writes them to the file "C:\temp\sql2005-users.sql" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2014a $scred -FilePath C:\temp\users.sql -Append </dev:code><dev:remarks><maml:para> Authenticates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2014a -User User1, User2 -FilePath C:\temp\users.sql </dev:code><dev:remarks><maml:para> Exports ONLY users User1 and User2 from sqlserver2014a to the file C:\temp\users.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2014a -User User1, User2 -Path C:\temp </dev:code><dev:remarks><maml:para> Exports ONLY users User1 and User2 from sqlserver2014a to the folder C:\temp. One file per user will be generated </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -User User1 -FilePath C:\temp\users.sql -DestinationVersion SQLServer2016 </dev:code><dev:remarks><maml:para> Exports user User1 from sqlserver2008 to the file C:\temp\users.sql with syntax to run on SQL Server 2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -FilePath C:\temp\users.sql </dev:code><dev:remarks><maml:para> Exports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\temp\users.sql file. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\> $options.ScriptDrops = $false PS C:\> $options.WithDependencies = $true PS C:\> Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -FilePath C:\temp\users.sql -ScriptingOptionsObject $options Exports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\temp\users.sql file. It will not script drops but will script dependencies. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -FilePath C:\temp\users.sql -ExcludeGoBatchSeparator </dev:code><dev:remarks><maml:para> Exports ONLY users from db1 and db2 database on sqlserver2008 server, to the C:\temp\users.sql file without the 'GO' batch separator. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -Database db1 -User user1 -Template -PassThru </dev:code><dev:remarks><maml:para> Exports user1 from database db1, replacing loginname and username with {templateLogin} and {templateUser} correspondingly. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaXECsv</command:name><command:noun>DbaXECsv</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports Extended Events to a CSV file.</maml:para></maml:description></command:details><maml:description><maml:para>Exports Extended Events to a CSV file.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaXECsv</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows Piping</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows Piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem -Path C:\temp\sample.xel | Export-DbaXECsv -Path c:\temp\sample.csv </dev:code><dev:remarks><maml:para> Writes Extended Events data to the file "C:\temp\events.csv". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2014 -Session deadlocks | Export-DbaXECsv -Path c:\temp\events.csv </dev:code><dev:remarks><maml:para> Writes Extended Events data to the file "C:\temp\events.csv". </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaXECsv</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports Extended Events creation script to a T-SQL file or console.</maml:para></maml:description></command:details><maml:description><maml:para>Exports script to create Extended Events Session to sql file or console.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaXESession</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A SQL Management Object - Microsoft.SqlServer.Management.XEvent.Session such as the one returned from Get-DbaSession</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>The Extended Event Session(s) to process. If unspecified, all Extended Event Sessions will be processed. This is ignored if An input object from Get-DbaSession is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If FilePath is specified and more than one Server is in input then -Append parameter is required to avoid overwriting data</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file. Only required if FilePath is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file. Only required if FilePath is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>Append to file. Only required if FilePath is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>Batch separator for scripting output. Uses the value from configuration Formatting.BatchSeparator by default. This is normally "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. If FilePath is specified and more than one Server is in input then -Append parameter is required to avoid overwriting data</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A SQL Management Object - Microsoft.SqlServer.Management.XEvent.Session such as the one returned from Get-DbaSession</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>Do not overwrite file. Only required if FilePath is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPrefix</maml:name><maml:description><maml:para>If this switch is used, the scripts will not include prefix information containing creator and datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Output script to console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>The Extended Event Session(s) to process. If unspecified, all Extended Event Sessions will be processed. This is ignored if An input object from Get-DbaSession is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>A DbaInstanceParameter representing an array of SQL Server instances or output from Get-DbaSession</maml:name><maml:uri /><maml:description /></dev:type></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Creates a new file for each SQL Server Instance</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaXESession -SqlInstance sourceserver -Passthru </dev:code><dev:remarks><maml:para> Exports a script to create all Extended Events Sessions on sourceserver to the console Will include prefix information containing creator and datetime. and uses the default value for BatchSeparator value from configuration Formatting.BatchSeparator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaXESession -SqlInstance sourceserver </dev:code><dev:remarks><maml:para> Exports a script to create all Extended Events Sessions on sourceserver. As no Path was defined - automatically determines filename based on the Path.DbatoolsExport configuration setting, current time and server name like Servername-YYYYMMDDhhmmss-sp_configure.sql Will include prefix information containing creator and datetime. and uses the default value for BatchSeparator value from configuration Formatting.BatchSeparator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaXESession -SqlInstance sourceserver -FilePath C:\temp </dev:code><dev:remarks><maml:para> Exports a script to create all Extended Events Sessions on sourceserver to the directory C:\temp using the default name format of Servername-YYYYMMDDhhmmss-sp_configure.sql Will include prefix information containing creator and datetime. and uses the default value for BatchSeparator value from configuration Formatting.BatchSeparator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaXESession -SqlInstance sourceserver -SqlCredential $cred -FilePath C:\temp\EEvents.sql -BatchSeparator "" -NoPrefix -NoClobber Exports a script to create all Extended Events Sessions on sourceserver to the file C:\temp\EEvents.sql. Will exclude prefix information containing creator and datetime and does not include a BatchSeparator Will not overwrite file if it already exists </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Server1', 'Server2' | Export-DbaXESession -FilePath 'C:\Temp\EE.sql' -Append </dev:code><dev:remarks><maml:para> Exports a script to create all Extended Events Sessions for Server1 and Server2 using pipeline. Writes to a single file using the Append switch </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance Server1, Server2 -Session system_health | Export-DbaXESession -Path 'C:\Temp' </dev:code><dev:remarks><maml:para> Exports a script to create the System_Health Extended Events Sessions for Server1 and Server2 using pipeline. Write to the directory C:\temp using the default name format of Servername-YYYYMMDDhhmmss-sp_configure.sql Will include prefix information containing creator and datetime. and uses the default value for BatchSeparator value from configuration Formatting.BatchSeparator </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Export-DbaXESessionTemplate</command:name><command:noun>DbaXESessionTemplate</command:noun><command:verb>Export</command:verb><maml:description><maml:para>Exports an XESession XML Template using XE Session(s) output by Get-DbaXESession</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Export-DbaXESessionTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>The Name of the session(s) to export.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies an XE Session output by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies an XE Session output by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>The Name of the session(s) to export.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Export-DbaXESessionTemplate -SqlInstance sql2017 -Path C:\temp\xe </dev:code><dev:remarks><maml:para> Exports an XESession XML Template for all Extended Event Sessions on sql2017 to the C:\temp\xe folder. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2017 -Session system_health | Export-DbaXESessionTemplate -Path C:\temp\xe </dev:code><dev:remarks><maml:para> Gets the system_health Extended Events Session from sql2017 and then exports as an XESession XML Template to C:\temp\xe </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Export-DbaXESessionTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find-DbaAgentJob finds agent jobs that fit certain search filters.</maml:para></maml:description></command:details><maml:description><maml:para>This command filters SQL Agent jobs giving the DBA a list of jobs that may need attention or could possibly be options for removal.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaAgentJob</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobName</maml:name><maml:description><maml:para>Filter agent jobs to only the name(s) you list. Supports regular expression (e.g. MyJob*) being passed in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobName</maml:name><maml:description><maml:para>Allows you to enter an array of agent job names to ignore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>Filter based on StepName. Supports regular expression (e.g. MyJob*) being passed in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastUsed</maml:name><maml:description><maml:para>Find all jobs that haven't ran in the INT number of previous day(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsDisabled</maml:name><maml:description><maml:para>Find all jobs that are disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailed</maml:name><maml:description><maml:para>Find all jobs that have failed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNotScheduled</maml:name><maml:description><maml:para>Find all jobs with no schedule assigned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNoEmailNotification</maml:name><maml:description><maml:para>Find all jobs without email notification configured</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filter based on agent job categories</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Filter based on owner of the job/s</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filter based on agent job categories</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobName</maml:name><maml:description><maml:para>Allows you to enter an array of agent job names to ignore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsDisabled</maml:name><maml:description><maml:para>Find all jobs that are disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailed</maml:name><maml:description><maml:para>Find all jobs that have failed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNoEmailNotification</maml:name><maml:description><maml:para>Find all jobs without email notification configured</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNotScheduled</maml:name><maml:description><maml:para>Find all jobs with no schedule assigned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobName</maml:name><maml:description><maml:para>Filter agent jobs to only the name(s) you list. Supports regular expression (e.g. MyJob*) being passed in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastUsed</maml:name><maml:description><maml:para>Find all jobs that haven't ran in the INT number of previous day(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Filter based on owner of the job/s</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>Filter based on StepName. Supports regular expression (e.g. MyJob*) being passed in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, Lookup Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01 -JobName *backup* </dev:code><dev:remarks><maml:para> Returns all agent job(s) that have backup in the name </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01, Dev02 -JobName Mybackup </dev:code><dev:remarks><maml:para> Returns all agent job(s) that are named exactly Mybackup </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01 -LastUsed 10 </dev:code><dev:remarks><maml:para> Returns all agent job(s) that have not ran in 10 days </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01 -IsDisabled -IsNoEmailNotification -IsNotScheduled </dev:code><dev:remarks><maml:para> Returns all agent job(s) that are either disabled, have no email notification or don't have a schedule. returned with detail </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Find-DbaAgentJob -IsFailed | Start-DbaAgentJob </dev:code><dev:remarks><maml:para> Finds all failed job then starts them. Consider using a -WhatIf at the end of Start-DbaAgentJob to see what it'll do first </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01 -LastUsed 10 -Exclude "Yearly - RollUp Workload", "SMS - Notification" </dev:code><dev:remarks><maml:para> Returns all agent jobs that have not ran in the last 10 days ignoring jobs "Yearly - RollUp Workload" and "SMS - Notification" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01 -Category "REPL-Distribution", "REPL-Snapshot" | Format-Table -AutoSize -Wrap </dev:code><dev:remarks><maml:para> Returns all job/s on Dev01 that are in either category "REPL-Distribution" or "REPL-Snapshot" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaAgentJob -SqlInstance Dev01, Dev02 -IsFailed -Since '2016-07-01 10:47:00' </dev:code><dev:remarks><maml:para> Returns all agent job(s) on Dev01 and Dev02 that have failed since July of 2016 (and still have history in msdb) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance CMSServer -Group Production | Find-DbaAgentJob -Disabled -IsNotScheduled | Format-Table -AutoSize -Wrap </dev:code><dev:remarks><maml:para> Queries 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Instances = 'SQL2017N5','SQL2019N5','SQL2019N20','SQL2019N21','SQL2019N22' </dev:code><dev:remarks><maml:para> Find-DbaAgentJob -SqlInstance $Instances -JobName *backup* -IsNotScheduled Returns all agent job(s) wiht backup in the name, that don't have a schedule on 'SQL2017N5','SQL2019N5','SQL2019N20','SQL2019N21','SQL2019N22' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaBackup</command:name><command:noun>DbaBackup</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Finds SQL Server backups on disk.</maml:para></maml:description></command:details><maml:description><maml:para>Provides all of the same functionality for finding SQL backups to remove from disk as a standard maintenance plan would.</maml:para><maml:para>As 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaBackup</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the name of the base level folder to search for backup files.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFileExtension</maml:name><maml:description><maml:para>Specifies the filename extension of the backup files you wish to find (typically 'bak', 'trn' or 'log'). Do not include the period.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetentionPeriod</maml:name><maml:description><maml:para>Specifies the retention period for backup files. Correct format is ##U. ## is the retention value and must be an integer value U signifies the units where the valid units are: h = hours d = days w = weeks m = months Formatting Examples: '48h' = 48 hours '7d' = 7 days '4w' = 4 weeks '1m' = 1 month</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckArchiveBit</maml:name><maml:description><maml:para>If this switch is enabled, the filesystem Archive bit is checked. If this bit is set (which translates to "it has not been backed up to another location yet"), the file won't be included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFileExtension</maml:name><maml:description><maml:para>Specifies the filename extension of the backup files you wish to find (typically 'bak', 'trn' or 'log'). Do not include the period.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckArchiveBit</maml:name><maml:description><maml:para>If this switch is enabled, the filesystem Archive bit is checked. If this bit is set (which translates to "it has not been backed up to another location yet"), the file won't be included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the name of the base level folder to search for backup files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetentionPeriod</maml:name><maml:description><maml:para>Specifies the retention period for backup files. Correct format is ##U. ## is the retention value and must be an integer value U signifies the units where the valid units are: h = hours d = days w = weeks m = months Formatting Examples: '48h' = 48 hours '7d' = 7 days '4w' = 4 weeks '1m' = 1 month</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, Lookup Author: Chris Sommer (@cjsommer), www.cjsommer.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaBackup -Path 'C:\MSSQL\SQL Backup\' -BackupFileExtension trn -RetentionPeriod 48h </dev:code><dev:remarks><maml:para> Searches for all trn files in C:\MSSQL\SQL Backup\ and all subdirectories that are more than 48 hours old will be included. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaBackup -Path 'C:\MSSQL\Backup\' -BackupFileExtension bak -RetentionPeriod 7d -CheckArchiveBit </dev:code><dev:remarks><maml:para> Searches 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 checking the Archive bit. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaBackup -Path '\\SQL2014\Backup\' -BackupFileExtension bak -RetentionPeriod 24h | Remove-Item -Verbose </dev:code><dev:remarks><maml:para> Searches for all bak files in \\SQL2014\Backup\ and all subdirectories that are more than 24 hours old and deletes only those files with verbose message. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaBackup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaCommand</command:name><command:noun>DbaCommand</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Finds dbatools commands searching through the inline help text</maml:para></maml:description></command:details><maml:description><maml:para>Finds dbatools commands searching through the inline help text, building a consolidated json index and querying it because Get-Help is too slow</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaCommand</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Searches help for all commands in dbatools for the specified pattern and displays all results</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tag</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated tag</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Author</maml:name><maml:description><maml:para>Finds all commands tagged with this author</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumVersion</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated minimum version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumVersion</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated maximum version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rebuild</maml:name><maml:description><maml:para>Rebuilds the index</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Author</maml:name><maml:description><maml:para>Finds all commands tagged with this author</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumVersion</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated maximum version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumVersion</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated minimum version</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Searches help for all commands in dbatools for the specified pattern and displays all results</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rebuild</maml:name><maml:description><maml:para>Rebuilds the index</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tag</maml:name><maml:description><maml:para>Finds all commands tagged with this auto-populated tag</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Lookup Author: Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand "snapshot" </dev:code><dev:remarks><maml:para> For lazy typers: finds all commands searching the entire help for "snapshot" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Pattern "snapshot" </dev:code><dev:remarks><maml:para> For rigorous typers: finds all commands searching the entire help for "snapshot" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Tag Job </dev:code><dev:remarks><maml:para> Finds all commands tagged with "Job" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Tag Job,Owner </dev:code><dev:remarks><maml:para> Finds all commands tagged with BOTH "Job" and "Owner" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Author Chrissy </dev:code><dev:remarks><maml:para> Finds every command whose author contains our beloved "Chrissy" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Author Chrissy -Tag AG </dev:code><dev:remarks><maml:para> Finds every command whose author contains our beloved "Chrissy" and it tagged as "AG" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaCommand -Pattern snapshot -Rebuild </dev:code><dev:remarks><maml:para> Finds all commands searching the entire help for "snapshot", rebuilding the index (good for developers) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaCommand</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find database/s on multiple servers that match criteria you input</maml:para></maml:description></command:details><maml:description><maml:para>Allows you to search SQL Server instances for database that have either the same name, owner or service broker guid.</maml:para><maml:para>There 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>What you would like to search on. Either Database Name, Owner, or Service Broker GUID. Database name is the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Value that is searched for. This is a regular expression match but you can just use a plain ol string like 'dbareports'</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exact</maml:name><maml:description><maml:para>Search for an exact match instead of a pattern</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exact</maml:name><maml:description><maml:para>Search for an exact match instead of a pattern</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Value that is searched for. This is a regular expression match but you can just use a plain ol string like 'dbareports'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>What you would like to search on. Either Database Name, Owner, or Service Broker GUID. Database name is the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Lookup Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDatabase -SqlInstance "DEV01", "DEV02", "UAT01", "UAT02", "PROD01", "PROD02" -Pattern Report </dev:code><dev:remarks><maml:para> Returns all database from the SqlInstances that have a database with Report in the name </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDatabase -SqlInstance "DEV01", "DEV02", "UAT01", "UAT02", "PROD01", "PROD02" -Pattern TestDB -Exact | Select-Object * </dev:code><dev:remarks><maml:para> Returns all database from the SqlInstances that have a database named TestDB with a detailed output. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDatabase -SqlInstance "DEV01", "DEV02", "UAT01", "UAT02", "PROD01", "PROD02" -Property ServiceBrokerGuid -Pattern '-faeb-495a-9898-f25a782835f5' | Select-Object * </dev:code><dev:remarks><maml:para> Returns all database from the SqlInstances that have the same Service Broker GUID with a detailed output </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaDbDisabledIndex</command:name><command:noun>DbaDbDisabledIndex</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find Disabled indexes</maml:para></maml:description></command:details><maml:description><maml:para>This command will help you to find disabled indexes on a database or a list of databases.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaDbDisabledIndex</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, the output file will not be overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, content will be appended to the output file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If this switch is enabled, the output file will not be overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Index, Lookup Author: Jason Squires, sqlnotnull.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDisabledIndex -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Generates the SQL statements to drop the selected disabled indexes on server "sql2005". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDisabledIndex -SqlInstance sqlserver2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Generates the SQL statements to drop the selected disabled indexes on server "sqlserver2016", using SQL Authentication to connect to the database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDisabledIndex -SqlInstance sqlserver2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> Generates the SQL Statement to drop selected indexes in databases db1 & db2 on server "sqlserver2016". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDisabledIndex -SqlInstance sqlserver2016 </dev:code><dev:remarks><maml:para> Generates the SQL statements to drop selected indexes on all user databases. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaDbDisabledIndex</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaDbDuplicateIndex</command:name><command:noun>DbaDbDuplicateIndex</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find duplicate and overlapping indexes.</maml:para></maml:description></command:details><maml:description><maml:para>This command will help you to find duplicate and overlapping indexes on a database or a list of databases.</maml:para><maml:para>On SQL Server 2008 and higher, the IsFiltered property will also be checked</maml:para><maml:para>Only supports CLUSTERED and NONCLUSTERED indexes.</maml:para><maml:para>Output:</maml:para><maml:para>TableName</maml:para><maml:para>IndexName</maml:para><maml:para>KeyColumns</maml:para><maml:para>IncludedColumns</maml:para><maml:para>IndexSizeMB</maml:para><maml:para>IndexType</maml:para><maml:para>CompressionDescription (When 2008+)</maml:para><maml:para>[RowCount]</maml:para><maml:para>IsDisabled</maml:para><maml:para>IsFiltered (When 2008+)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaDbDuplicateIndex</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeOverlapping</maml:name><maml:description><maml:para>If this switch is enabled, indexes which are partially duplicated will be returned. Example: If the first key column is the same between two indexes, but one has included columns and the other not, this will be shown.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeOverlapping</maml:name><maml:description><maml:para>If this switch is enabled, indexes which are partially duplicated will be returned. Example: If the first key column is the same between two indexes, but one has included columns and the other not, this will be shown.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Index, Lookup Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDuplicateIndex -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Returns duplicate indexes found on sql2005 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDuplicateIndex -SqlInstance sql2017 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Finds exact duplicate indexes on all user databases present on sql2017, using SQL authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDuplicateIndex -SqlInstance sql2017 -Database db1, db2 </dev:code><dev:remarks><maml:para> Finds exact duplicate indexes on the db1 and db2 databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbDuplicateIndex -SqlInstance sql2017 -IncludeOverlapping </dev:code><dev:remarks><maml:para> Finds both duplicate and overlapping indexes on all user databases. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaDbDuplicateIndex</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaDbGrowthEvent</command:name><command:noun>DbaDbGrowthEvent</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Finds any database AutoGrow events in the Default Trace.</maml:para></maml:description></command:details><maml:description><maml:para>Finds any database AutoGrow events in the Default Trace.</maml:para><maml:para>The following events are included:</maml:para><maml:para>92 - Data File Auto Grow</maml:para><maml:para>93 - Log File Auto Grow</maml:para><maml:para>94 - Data File Auto Shrink</maml:para><maml:para>95 - Log File Auto Shrink</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaDbGrowthEvent</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventType</maml:name><maml:description><maml:para>Provide a filter on growth event type to filter the results. Allowed values: Growth, Shrink</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Provide a filter on file type to filter the results. Allowed values: Data, Log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLocalTime</maml:name><maml:description><maml:para>Return the local time of the instance instead of converting to UTC.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventType</maml:name><maml:description><maml:para>Provide a filter on growth event type to filter the results. Allowed values: Growth, Shrink</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Provide a filter on file type to filter the results. Allowed values: Data, Log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLocalTime</maml:name><maml:description><maml:para>Return the local time of the instance instead of converting to UTC.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AutoGrow, Database, Lookup Author: Aaron Nelson Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Query Extracted from SQL Server Management Studio (SSMS) 2016. </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns any database AutoGrow events in the Default Trace with UTC time for the instance for every database on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance localhost -UseLocalTime </dev:code><dev:remarks><maml:para> Returns any database AutoGrow events in the Default Trace with the local time of the instance for every database on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016, ServerA\SQL2014 </dev:code><dev:remarks><maml:para> Returns any database AutoGrow events in the Default Traces for every database on ServerA\sql2016 & ServerA\SQL2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 | Format-Table -AutoSize -Wrap </dev:code><dev:remarks><maml:para> Returns any database AutoGrow events in the Default Trace for every database on the ServerA\SQL2016 instance in a table format. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 -EventType Shrink </dev:code><dev:remarks><maml:para> Returns any database Auto Shrink events in the Default Trace for every database on the ServerA\SQL2016 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 -EventType Growth -FileType Data </dev:code><dev:remarks><maml:para> Returns any database Auto Growth events on data files in the Default Trace for every database on the ServerA\SQL2016 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaDbGrowthEvent</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaDbUnusedIndex</command:name><command:noun>DbaDbUnusedIndex</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find unused indexes</maml:para></maml:description></command:details><maml:description><maml:para>This command will help you to find Unused indexes on a database or a list of databases</maml:para><maml:para>For now only supported for CLUSTERED and NONCLUSTERED indexes</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaDbUnusedIndex</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to check for unused indexes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreUptime</maml:name><maml:description><maml:para>Less than 7 days uptime can mean that analysis of unused indexes is unreliable, and normally no results will be returned. By setting this option results will be returned even if the Instance has been running for less than 7 days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Seeks</maml:name><maml:description><maml:para>Specify a custom threshold for user seeks. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scans</maml:name><maml:description><maml:para>Specify a custom threshold for user scans. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Lookups</maml:name><maml:description><maml:para>Specify a custom threshold for user lookups. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreUptime</maml:name><maml:description><maml:para>Less than 7 days uptime can mean that analysis of unused indexes is unreliable, and normally no results will be returned. By setting this option results will be returned even if the Instance has been running for less than 7 days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Lookups</maml:name><maml:description><maml:para>Specify a custom threshold for user lookups. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scans</maml:name><maml:description><maml:para>Specify a custom threshold for user scans. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Seeks</maml:name><maml:description><maml:para>Specify a custom threshold for user seeks. The default for this parameter is 1. The valid values are between 1 and 1000000 to provide flexibility on the definition of 'unused' indexes. Note: The resulting WHERE clause uses the AND operator: user_seeks < $Seeks AND user_scans < $Scans AND user_lookups < $Lookups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to check for unused indexes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Index, Lookup Author: Aaron Nelson (@SQLvariant), SQLvariant.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbUnusedIndex -SqlInstance sql2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> Finds unused indexes on db1 and db2 on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaDbUnusedIndex -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Finds unused indexes on db1 and db2 on sql2016 using SQL Authentication to connect to the server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 | Find-DbaDbUnusedIndex </dev:code><dev:remarks><maml:para> Finds unused indexes on all databases on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2019 | Find-DbaDbUnusedIndex -Seeks 10 -Scans 100 -Lookups 1000 </dev:code><dev:remarks><maml:para> Finds 'unused' indexes with user_seeks < 10, user_scans < 100, and user_lookups < 1000 on all databases on sql2019. Note that these additional parameters provide flexibility to define what is considered an 'unused' index. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaDbUnusedIndex</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Search for SQL Server Instances.</maml:para></maml:description></command:details><maml:description><maml:para>This function searches for SQL Server Instances.</maml:para><maml:para>It supports a variety of scans for this purpose which can be separated in two categories:</maml:para><maml:para>- Discovery</maml:para><maml:para>- Scan</maml:para><maml:para>Discovery:</maml:para><maml:para>This is where it compiles a list of computers / addresses to check.</maml:para><maml:para>It supports several methods of generating such lists (including Active Directory lookup or IP Ranges), but also supports specifying a list of computers to check.</maml:para><maml:para>- For details on discovery, see the documentation on the '-DiscoveryType' parameter</maml:para><maml:para>- For details on explicitly providing a list, see the documentation on the '-ComputerName' parameter</maml:para><maml:para>Scan:</maml:para><maml:para>Once a list of computers has been provided, this command will execute a variety of actions to determine any instances present for each of them.</maml:para><maml:para>This is described in more detail in the documentation on the '-ScanType' parameter.</maml:para><maml:para>Additional parameters allow more granular control over individual scans (e.g. Credentials to use).</maml:para><maml:para>Note on logging and auditing:</maml:para><maml:para>The Discovery phase is un-problematic since it is non-intrusive, however during the scan phase, all targeted computers may be accessed repeatedly.</maml:para><maml:para>This may cause issues with security teams, due to many logon events and possibly failed authentication.</maml:para><maml:para>This action constitutes a network scan, which may be illegal depending on the nation you are in and whether you own the network you scan.</maml:para><maml:para>If you are unsure whether you may use this command in your environment, check the detailed description on the '-ScanType' parameter and contact your IT security team for advice.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaInstance</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use on windows network connection. These credentials are used for: - Contact to domain controllers for SPN lookups (only if explicit Domain Controller is specified) - CIM/WMI contact to the scanned computers during the scan phase (see the '-ScanType' parameter documentation on affected scans).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>The credentials used to connect to SqlInstances to during the scan phase. See the '-ScanType' parameter documentation on affected scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScanType</maml:name><maml:description><maml:para>The scans are the individual methods used to retrieve information about the scanned computer and any potentially installed instances. This parameter is optional, by default all scans except for establishing an actual SQL connection are performed. Scans can be specified in any arbitrary combination, however at least one instance detecting scan needs to be specified in order for data to be returned. Scans: Browser - Tries discovering all instances via the browser service - This scan detects instances. SQLService - Tries listing all SQL Services using CIM/WMI - This scan uses credentials specified in the '-Credential' parameter if any. - This scan detects instances. - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). SPN - Tries looking up the Service Principal Names for each instance - Will use the nearest Domain Controller by default - Target a specific domain controller using the '-DomainController' parameter - If using the '-DomainController' parameter, use the '-Credential' parameter to specify the credentials used to connect TCPPort - Tries connecting to the TCP Ports. - By default, port 1433 is connected to. - The parameter '-TCPPort' can be used to provide a list of port numbers to scan. - This scan detects possible instances. Since other services might bind to a given port, this is not the most reliable test. - This scan is also used to validate found SPNs if both scans are used in combination DNSResolve - Tries resolving the computername in DNS Ping - Tries pinging the computer. Failure will NOT terminate scans. SqlConnect - Tries to establish a SQL connection to the server - Uses windows credentials by default - Specify custom credentials using the '-SqlCredential' parameter - This scan is not used by default - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). All - All of the above</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DomainController</maml:name><maml:description><maml:para>The domain controller to contact for SPN lookups / searches. Uses the credentials from the '-Credential' parameter if specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TCPPort</maml:name><maml:description><maml:para>The ports to scan in the TCP Port Scan method. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumConfidence</maml:name><maml:description><maml:para>This command tries to discover instances, which isn't always a sure thing. Depending on the number and type of scans completed, we have different levels of confidence in our results. By default, we will return anything that we have at least a low confidence of being an instance. These are the confidence levels we support and how they are determined: - High: Established SQL Connection (including rejection for bad credentials) or service scan. - Medium: Browser reply or a combination of TCPConnect _and_ SPN test. - Low: Either TCPConnect _or_ SPN - None: Computer existence could be verified, but no sign of an SQL Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Find-DbaInstance</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to scan. Can be a variety of input types, including text or the output of Get-ADComputer. Any extra instance information (such as connection strings or live sql server connections) beyond the computername will be discarded.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use on windows network connection. These credentials are used for: - Contact to domain controllers for SPN lookups (only if explicit Domain Controller is specified) - CIM/WMI contact to the scanned computers during the scan phase (see the '-ScanType' parameter documentation on affected scans).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>The credentials used to connect to SqlInstances to during the scan phase. See the '-ScanType' parameter documentation on affected scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScanType</maml:name><maml:description><maml:para>The scans are the individual methods used to retrieve information about the scanned computer and any potentially installed instances. This parameter is optional, by default all scans except for establishing an actual SQL connection are performed. Scans can be specified in any arbitrary combination, however at least one instance detecting scan needs to be specified in order for data to be returned. Scans: Browser - Tries discovering all instances via the browser service - This scan detects instances. SQLService - Tries listing all SQL Services using CIM/WMI - This scan uses credentials specified in the '-Credential' parameter if any. - This scan detects instances. - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). SPN - Tries looking up the Service Principal Names for each instance - Will use the nearest Domain Controller by default - Target a specific domain controller using the '-DomainController' parameter - If using the '-DomainController' parameter, use the '-Credential' parameter to specify the credentials used to connect TCPPort - Tries connecting to the TCP Ports. - By default, port 1433 is connected to. - The parameter '-TCPPort' can be used to provide a list of port numbers to scan. - This scan detects possible instances. Since other services might bind to a given port, this is not the most reliable test. - This scan is also used to validate found SPNs if both scans are used in combination DNSResolve - Tries resolving the computername in DNS Ping - Tries pinging the computer. Failure will NOT terminate scans. SqlConnect - Tries to establish a SQL connection to the server - Uses windows credentials by default - Specify custom credentials using the '-SqlCredential' parameter - This scan is not used by default - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). All - All of the above</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DomainController</maml:name><maml:description><maml:para>The domain controller to contact for SPN lookups / searches. Uses the credentials from the '-Credential' parameter if specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TCPPort</maml:name><maml:description><maml:para>The ports to scan in the TCP Port Scan method. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumConfidence</maml:name><maml:description><maml:para>This command tries to discover instances, which isn't always a sure thing. Depending on the number and type of scans completed, we have different levels of confidence in our results. By default, we will return anything that we have at least a low confidence of being an instance. These are the confidence levels we support and how they are determined: - High: Established SQL Connection (including rejection for bad credentials) or service scan. - Medium: Browser reply or a combination of TCPConnect _and_ SPN test. - Low: Either TCPConnect _or_ SPN - None: Computer existence could be verified, but no sign of an SQL Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Find-DbaInstance</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DiscoveryType</maml:name><maml:description><maml:para>The mechanisms to be used to discover instances. Supports any combination of: - Service Principal Name lookup ('DomainSPN'; from Active Directory) - SQL Instance Enumeration ('DataSourceEnumeration'; same as SSMS uses) - IP Address range ('IPRange'; all IP Addresses will be scanned) - Domain Server lookup ('DomainServer'; from Active Directory) SPN Lookup: The function tries to connect active directory to look up all computers with registered SQL Instances. Not all instances need to be registered properly, making this not 100% reliable. By default, your nearest Domain Controller is contacted for this scan. However it is possible to explicitly state the DC to contact using its DistinguishedName and the '-DomainController' parameter. If credentials were specified using the '-Credential' parameter, those same credentials are used to perform this lookup, allowing the scan of other domains. SQL Instance Enumeration: This uses the default UDP Broadcast based instance enumeration used by SSMS to detect instances. Note that the result from this is not used in the actual scan, but only to compile a list of computers to scan. To enable the same results for the scan, ensure that the 'Browser' scan is enabled. IP Address range: This 'Discovery' uses a range of IPAddresses and simply passes them on to be tested. See the 'Description' part of help on security issues of network scanning. By default, it will enumerate all ethernet network adapters on the local computer and scan the entire subnet they are on. By using the '-IpAddress' parameter, custom network ranges can be specified. Domain Server: This will discover every single computer in Active Directory that is a Windows Server and enabled. By default, your nearest Domain Controller is contacted for this scan. However it is possible to explicitly state the DC to contact using its DistinguishedName and the '-DomainController' parameter. If credentials were specified using the '-Credential' parameter, those same credentials are used to perform this lookup, allowing the scan of other domains.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceDiscoveryType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceDiscoveryType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use on windows network connection. These credentials are used for: - Contact to domain controllers for SPN lookups (only if explicit Domain Controller is specified) - CIM/WMI contact to the scanned computers during the scan phase (see the '-ScanType' parameter documentation on affected scans).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>The credentials used to connect to SqlInstances to during the scan phase. See the '-ScanType' parameter documentation on affected scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScanType</maml:name><maml:description><maml:para>The scans are the individual methods used to retrieve information about the scanned computer and any potentially installed instances. This parameter is optional, by default all scans except for establishing an actual SQL connection are performed. Scans can be specified in any arbitrary combination, however at least one instance detecting scan needs to be specified in order for data to be returned. Scans: Browser - Tries discovering all instances via the browser service - This scan detects instances. SQLService - Tries listing all SQL Services using CIM/WMI - This scan uses credentials specified in the '-Credential' parameter if any. - This scan detects instances. - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). SPN - Tries looking up the Service Principal Names for each instance - Will use the nearest Domain Controller by default - Target a specific domain controller using the '-DomainController' parameter - If using the '-DomainController' parameter, use the '-Credential' parameter to specify the credentials used to connect TCPPort - Tries connecting to the TCP Ports. - By default, port 1433 is connected to. - The parameter '-TCPPort' can be used to provide a list of port numbers to scan. - This scan detects possible instances. Since other services might bind to a given port, this is not the most reliable test. - This scan is also used to validate found SPNs if both scans are used in combination DNSResolve - Tries resolving the computername in DNS Ping - Tries pinging the computer. Failure will NOT terminate scans. SqlConnect - Tries to establish a SQL connection to the server - Uses windows credentials by default - Specify custom credentials using the '-SqlCredential' parameter - This scan is not used by default - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). All - All of the above</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>This parameter can be used to override the defaults for the IPRange discovery. This parameter accepts a list of strings supporting any combination of: - Plain IP Addresses (e.g.: "10.1.1.1") - IP Address Ranges (e.g.: "10.1.1.1-10.1.1.5") - IP Address & Subnet Mask (e.g.: "10.1.1.1/255.255.255.0") - IP Address & Subnet Length: (e.g.: "10.1.1.1/24) Overlapping addresses will not result in duplicate scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DomainController</maml:name><maml:description><maml:para>The domain controller to contact for SPN lookups / searches. Uses the credentials from the '-Credential' parameter if specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TCPPort</maml:name><maml:description><maml:para>The ports to scan in the TCP Port Scan method. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumConfidence</maml:name><maml:description><maml:para>This command tries to discover instances, which isn't always a sure thing. Depending on the number and type of scans completed, we have different levels of confidence in our results. By default, we will return anything that we have at least a low confidence of being an instance. These are the confidence levels we support and how they are determined: - High: Established SQL Connection (including rejection for bad credentials) or service scan. - Medium: Browser reply or a combination of TCPConnect _and_ SPN test. - Low: Either TCPConnect _or_ SPN - None: Computer existence could be verified, but no sign of an SQL Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to scan. Can be a variety of input types, including text or the output of Get-ADComputer. Any extra instance information (such as connection strings or live sql server connections) beyond the computername will be discarded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use on windows network connection. These credentials are used for: - Contact to domain controllers for SPN lookups (only if explicit Domain Controller is specified) - CIM/WMI contact to the scanned computers during the scan phase (see the '-ScanType' parameter documentation on affected scans).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DiscoveryType</maml:name><maml:description><maml:para>The mechanisms to be used to discover instances. Supports any combination of: - Service Principal Name lookup ('DomainSPN'; from Active Directory) - SQL Instance Enumeration ('DataSourceEnumeration'; same as SSMS uses) - IP Address range ('IPRange'; all IP Addresses will be scanned) - Domain Server lookup ('DomainServer'; from Active Directory) SPN Lookup: The function tries to connect active directory to look up all computers with registered SQL Instances. Not all instances need to be registered properly, making this not 100% reliable. By default, your nearest Domain Controller is contacted for this scan. However it is possible to explicitly state the DC to contact using its DistinguishedName and the '-DomainController' parameter. If credentials were specified using the '-Credential' parameter, those same credentials are used to perform this lookup, allowing the scan of other domains. SQL Instance Enumeration: This uses the default UDP Broadcast based instance enumeration used by SSMS to detect instances. Note that the result from this is not used in the actual scan, but only to compile a list of computers to scan. To enable the same results for the scan, ensure that the 'Browser' scan is enabled. IP Address range: This 'Discovery' uses a range of IPAddresses and simply passes them on to be tested. See the 'Description' part of help on security issues of network scanning. By default, it will enumerate all ethernet network adapters on the local computer and scan the entire subnet they are on. By using the '-IpAddress' parameter, custom network ranges can be specified. Domain Server: This will discover every single computer in Active Directory that is a Windows Server and enabled. By default, your nearest Domain Controller is contacted for this scan. However it is possible to explicitly state the DC to contact using its DistinguishedName and the '-DomainController' parameter. If credentials were specified using the '-Credential' parameter, those same credentials are used to perform this lookup, allowing the scan of other domains.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceDiscoveryType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceDiscoveryType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DomainController</maml:name><maml:description><maml:para>The domain controller to contact for SPN lookups / searches. Uses the credentials from the '-Credential' parameter if specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>This parameter can be used to override the defaults for the IPRange discovery. This parameter accepts a list of strings supporting any combination of: - Plain IP Addresses (e.g.: "10.1.1.1") - IP Address Ranges (e.g.: "10.1.1.1-10.1.1.5") - IP Address & Subnet Mask (e.g.: "10.1.1.1/255.255.255.0") - IP Address & Subnet Length: (e.g.: "10.1.1.1/24) Overlapping addresses will not result in duplicate scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumConfidence</maml:name><maml:description><maml:para>This command tries to discover instances, which isn't always a sure thing. Depending on the number and type of scans completed, we have different levels of confidence in our results. By default, we will return anything that we have at least a low confidence of being an instance. These are the confidence levels we support and how they are determined: - High: Established SQL Connection (including rejection for bad credentials) or service scan. - Medium: Browser reply or a combination of TCPConnect _and_ SPN test. - Low: Either TCPConnect _or_ SPN - None: Computer existence could be verified, but no sign of an SQL Instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceConfidenceLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScanType</maml:name><maml:description><maml:para>The scans are the individual methods used to retrieve information about the scanned computer and any potentially installed instances. This parameter is optional, by default all scans except for establishing an actual SQL connection are performed. Scans can be specified in any arbitrary combination, however at least one instance detecting scan needs to be specified in order for data to be returned. Scans: Browser - Tries discovering all instances via the browser service - This scan detects instances. SQLService - Tries listing all SQL Services using CIM/WMI - This scan uses credentials specified in the '-Credential' parameter if any. - This scan detects instances. - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). SPN - Tries looking up the Service Principal Names for each instance - Will use the nearest Domain Controller by default - Target a specific domain controller using the '-DomainController' parameter - If using the '-DomainController' parameter, use the '-Credential' parameter to specify the credentials used to connect TCPPort - Tries connecting to the TCP Ports. - By default, port 1433 is connected to. - The parameter '-TCPPort' can be used to provide a list of port numbers to scan. - This scan detects possible instances. Since other services might bind to a given port, this is not the most reliable test. - This scan is also used to validate found SPNs if both scans are used in combination DNSResolve - Tries resolving the computername in DNS Ping - Tries pinging the computer. Failure will NOT terminate scans. SqlConnect - Tries to establish a SQL connection to the server - Uses windows credentials by default - Specify custom credentials using the '-SqlCredential' parameter - This scan is not used by default - Success in this scan guarantees high confidence (See parameter '-MinimumConfidence' for details). All - All of the above</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Discovery.DbaInstanceScanType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>The credentials used to connect to SqlInstances to during the scan phase. See the '-ScanType' parameter documentation on affected scans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TCPPort</maml:name><maml:description><maml:para>The ports to scan in the TCP Port Scan method. Defaults to 1433.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Connect, SqlServer, Lookup Author: Scott Sutherland, 2018 NetSPI | Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Outside resources used and modified: https://gallery.technet.microsoft.com/scriptcenter/List-the-IP-addresses-in-a-60c5bb6b </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaInstance -DiscoveryType Domain, DataSourceEnumeration </dev:code><dev:remarks><maml:para> Performs a network search for SQL Instances by: - Looking up the Service Principal Names of computers in Active Directory - Using the UDP broadcast based auto-discovery of SSMS After that it will extensively scan all hosts thus discovered for instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaInstance -DiscoveryType All </dev:code><dev:remarks><maml:para> Performs a network search for SQL Instances, using all discovery protocols: - Active directory search for Service Principal Names - SQL Instance Enumeration (same as SSMS does) - All IPAddresses in the current computer's subnets of all connected network interfaces Note: This scan will take a long time, due to including the IP Scan </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ADComputer -Filter "*" | Find-DbaInstance </dev:code><dev:remarks><maml:para> Scans all computers in the domain for SQL Instances, using a deep probe: - Tries resolving the name in DNS - Tries pinging the computer - Tries listing all SQL Services using CIM/WMI - Tries discovering all instances via the browser service - Tries connecting to the default TCP Port (1433) - Tries connecting to the TCP port of each discovered instance - Tries to establish a SQL connection to the server using default windows credentials - Tries looking up the Service Principal Names for each instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Content .\servers.txt | Find-DbaInstance -SqlCredential $cred -ScanType Browser, SqlConnect </dev:code><dev:remarks><maml:para> Reads all servers from the servers.txt file (one server per line), then scans each of them for instances using the browser service and finally attempts to connect to each instance found using the specified credentials. then scans each of them for instances using the browser service and SqlService </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaInstance -ComputerName localhost | Get-DbaDatabase | Format-Table -Wrap </dev:code><dev:remarks><maml:para> Scans localhost for instances using the browser service, traverses all instances for all databases and displays all information in a formatted table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $databases = Find-DbaInstance -ComputerName localhost | Get-DbaDatabase </dev:code><dev:remarks><maml:para> PS C:\> $results = $databases | Select-Object SqlInstance, Name, Status, RecoveryModel, SizeMB, Compatibility, Owner, LastFullBackup, LastDiffBackup, LastLogBackup PS C:\> $results | Format-Table -Wrap Scans 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. Using this method regularly is not recommended. Use Get-DbaService or Get-DbaRegServer instead. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaLoginInGroup</command:name><command:noun>DbaLoginInGroup</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Finds Logins in Active Directory groups that have logins on the SQL Instance.</maml:para></maml:description></command:details><maml:description><maml:para>Outputs all the active directory groups members for a server, or limits it to find a specific AD user in the groups</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaLoginInGroup</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>PSCredential object to connect under. If not specified, current Windows login will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Find all AD Groups used on the instance that an individual login is a member of.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Find all AD Groups used on the instance that an individual login is a member of.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>PSCredential object to connect under. If not specified, current Windows login will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login, Group, Lookup Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaLoginInGroup -SqlInstance DEV01 -Login "MyDomain\Stephen.Bennett" </dev:code><dev:remarks><maml:para> Returns all active directory groups with logins on Sql Instance DEV01 that contain the AD user Stephen.Bennett. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaLoginInGroup -SqlInstance DEV01 </dev:code><dev:remarks><maml:para> Returns all active directory users within all windows AD groups that have logins on the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaLoginInGroup -SqlInstance DEV01 | Where-Object Login -like '*stephen*' </dev:code><dev:remarks><maml:para> Returns all active directory users within all windows AD groups that have logins on the instance whose login contains "stephen" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaLoginInGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaOrphanedFile</command:name><command:noun>DbaOrphanedFile</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Find-DbaOrphanedFile finds orphaned database files. Orphaned database files are files not associated with any attached database.</maml:para></maml:description></command:details><maml:description><maml:para>This command searches all directories associated with SQL database files for database files that are not currently in use by the SQL Server instance.</maml:para><maml:para>By 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.</maml:para><maml:para>You can specify additional filetypes using the -FileType parameter, and additional paths to search using the -Path parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaOrphanedFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies one or more directories to search in addition to the default data and log directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Specifies file extensions other than mdf, ldf and ndf to search for. Do not include the dot (".") when specifying the extension.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalOnly</maml:name><maml:description><maml:para>If this switch is enabled, only local filenames will be returned. Using this switch with multiple servers is not recommended since it does not return the associated server name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Recurse</maml:name><maml:description><maml:para>If this switch is enabled, the command will search subdirectories of the Path parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Find-DbaOrphanedFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies one or more directories to search in addition to the default data and log directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Specifies file extensions other than mdf, ldf and ndf to search for. Do not include the dot (".") when specifying the extension.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteOnly</maml:name><maml:description><maml:para>If this switch is enabled, only remote filenames will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Recurse</maml:name><maml:description><maml:para>If this switch is enabled, the command will search subdirectories of the Path parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Specifies file extensions other than mdf, ldf and ndf to search for. Do not include the dot (".") when specifying the extension.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalOnly</maml:name><maml:description><maml:para>If this switch is enabled, only local filenames will be returned. Using this switch with multiple servers is not recommended since it does not return the associated server name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies one or more directories to search in addition to the default data and log directories.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Recurse</maml:name><maml:description><maml:para>If this switch is enabled, the command will search subdirectories of the Path parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteOnly</maml:name><maml:description><maml:para>If this switch is enabled, only remote filenames will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Orphan, Database, DatabaseFile, Lookup Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers Thanks to Paul Randal's notes on FILESTREAM which can be found at http://www.sqlskills.com/blogs/paul/filestream-directory-structure/ </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Connects to sqlserver2014a, authenticating with Windows credentials, and searches for orphaned files. Returns server name, local filename, and unc path to file. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Connects to sqlserver2014a, authenticating with SQL Server authentication, and searches for orphaned files. Returns server name, local filename, and unc path to file. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sql2014 -Path 'E:\Dir1', 'E:\Dir2' </dev:code><dev:remarks><maml:para> Finds the orphaned files in "E:\Dir1" and "E:Dir2" in addition to the default directories. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sql2014 -Path 'E:\Dir1' -Recurse </dev:code><dev:remarks><maml:para> Finds the orphaned files in "E:\Dir1" and any of its subdirectories in addition to the default directories. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sql2014 -LocalOnly </dev:code><dev:remarks><maml:para> Returns only the local file paths for orphaned files. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sql2014 -RemoteOnly </dev:code><dev:remarks><maml:para> Returns only the remote file path for orphaned files. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaOrphanedFile -SqlInstance sql2014, sql2016 -FileType fsf, mld </dev:code><dev:remarks><maml:para> Finds the orphaned ending with ".fsf" and ".mld" in addition to the default filetypes ".mdf", ".ldf", ".ndf" for both the servers sql2014 and sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaOrphanedFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaSimilarTable</command:name><command:noun>DbaSimilarTable</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Returns all tables/views that are similar in structure by comparing the column names of matching and matched tables/views</maml:para></maml:description></command:details><maml:description><maml:para>This function can either run against specific databases or all databases searching all/specific tables and views including in system databases.</maml:para><maml:para>Typically one would use this to find for example archive version(s) of a table whose structures are similar.</maml:para><maml:para>This 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.</maml:para><maml:para>More information can be found here: https://sqljana.wordpress.com/2017/03/31/sql-server-find-tables-with-similar-table-structure/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaSimilarTable</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaName</maml:name><maml:description><maml:para>If you are looking in a specific schema whose table structures is to be used as reference structure, provide the name of the schema. If no schema is provided, looks at all schemas</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TableName</maml:name><maml:description><maml:para>If you are looking in a specific table whose structure is to be used as reference structure, provide the name of the table. If no table is provided, looks at all tables If the table name exists in multiple schemas, all of them would qualify</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeViews</maml:name><maml:description><maml:para>By default, views are included. You can exclude them by setting this switch to $false This excludes views in both matching and matched list</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MatchPercentThreshold</maml:name><maml:description><maml:para>The minimum percentage of column names that should match between the matching and matched objects. Entries with no matches are eliminated</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeViews</maml:name><maml:description><maml:para>By default, views are included. You can exclude them by setting this switch to $false This excludes views in both matching and matched list</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MatchPercentThreshold</maml:name><maml:description><maml:para>The minimum percentage of column names that should match between the matching and matched objects. Entries with no matches are eliminated</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaName</maml:name><maml:description><maml:para>If you are looking in a specific schema whose table structures is to be used as reference structure, provide the name of the schema. If no schema is provided, looks at all schemas</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TableName</maml:name><maml:description><maml:para>If you are looking in a specific table whose structure is to be used as reference structure, provide the name of the table. If no table is provided, looks at all tables If the table name exists in multiple schemas, all of them would qualify</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Lookup Author: Jana Sattainathan (@SQLJana), sqljana.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaSimilarTable -SqlInstance DEV01 </dev:code><dev:remarks><maml:para> Searches all user database tables and views for each, returns all tables or views with their matching tables/views and match percent </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks </dev:code><dev:remarks><maml:para> Searches AdventureWorks database and lists tables/views and their corresponding matching tables/views with match percent </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -SchemaName HumanResource </dev:code><dev:remarks><maml:para> Searches AdventureWorks database and lists tables/views in the HumanResource schema with their corresponding matching tables/views with match percent </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -SchemaName HumanResource -Table Employee </dev:code><dev:remarks><maml:para> Searches AdventureWorks database and lists tables/views in the HumanResource schema and table Employee with its corresponding matching tables/views with match percent </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaSimilarTable -SqlInstance DEV01 -Database AdventureWorks -MatchPercentThreshold 60 </dev:code><dev:remarks><maml:para> Searches AdventureWorks database and lists all tables/views with its corresponding matching tables/views with match percent greater than or equal to 60 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaSimilarTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaStoredProcedure</command:name><command:noun>DbaStoredProcedure</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Returns all stored procedures that contain a specific case-insensitive string or regex pattern.</maml:para></maml:description></command:details><maml:description><maml:para>This function can either run against specific databases or all databases searching all user or user and system stored procedures.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaStoredProcedure</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the stored procedure text body</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system stored procedures are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system stored procedures are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the stored procedure text body</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: StoredProcedure, Proc, Lookup Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaStoredProcedure -SqlInstance DEV01 -Pattern whatever </dev:code><dev:remarks><maml:para> Searches all user databases stored procedures for "whatever" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaStoredProcedure -SqlInstance sql2016 -Pattern '\w+@\w+\.\w+' </dev:code><dev:remarks><maml:para> Searches all databases for all stored procedures that contain a valid email pattern in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaStoredProcedure -SqlInstance DEV01 -Database MyDB -Pattern 'some string' -Verbose </dev:code><dev:remarks><maml:para> Searches in "mydb" database stored procedures for "some string" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaStoredProcedure -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects </dev:code><dev:remarks><maml:para> Searches in "mydb" database stored procedures for "runtime" in the text body </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaStoredProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaTrigger</command:name><command:noun>DbaTrigger</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Returns all triggers that contain a specific case-insensitive string or regex pattern.</maml:para></maml:description></command:details><maml:description><maml:para>This function search on Instance, Database and Object level.</maml:para><maml:para>If you specify one or more databases, search on Server level will not be preformed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaTrigger</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the trigger text body</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TriggerLevel</maml:name><maml:description><maml:para>Allows specify the trigger level that you want to search. By default is All (Server, Database, Object).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system triggers are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system triggers are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the trigger text body</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TriggerLevel</maml:name><maml:description><maml:para>Allows specify the trigger level that you want to search. By default is All (Server, Database, Object).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trigger, Lookup Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaTrigger -SqlInstance DEV01 -Pattern whatever </dev:code><dev:remarks><maml:para> Searches all user databases triggers for "whatever" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaTrigger -SqlInstance sql2016 -Pattern '\w+@\w+\.\w+' </dev:code><dev:remarks><maml:para> Searches all databases for all triggers that contain a valid email pattern in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaTrigger -SqlInstance DEV01 -Database MyDB -Pattern 'some string' -Verbose </dev:code><dev:remarks><maml:para> Searches in "mydb" database triggers for "some string" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaTrigger -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects </dev:code><dev:remarks><maml:para> Searches in "mydb" database triggers for "runtime" in the text body </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaTrigger</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaUserObject</command:name><command:noun>DbaUserObject</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Searches SQL Server to find user-owned objects (i.e. not dbo or sa) or for any object owned by a specific user specified by the Pattern parameter.</maml:para></maml:description></command:details><maml:description><maml:para>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)</maml:para><maml:para>Database Owner</maml:para><maml:para>Agent Job Owner</maml:para><maml:para>Used in Credential</maml:para><maml:para>USed in Proxy</maml:para><maml:para>SQL Agent Steps using a Proxy</maml:para><maml:para>Endpoints</maml:para><maml:para>Server Roles</maml:para><maml:para>Database Schemas</maml:para><maml:para>Database Roles</maml:para><maml:para>Database Assembles</maml:para><maml:para>Database Synonyms</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaUserObject</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>The regex pattern that the command will search for</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>The regex pattern that the command will search for</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Object, Lookup Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaUserObject -SqlInstance DEV01 -Pattern ad\stephen </dev:code><dev:remarks><maml:para> Searches user objects for owner ad\stephen </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaUserObject -SqlInstance DEV01 -Verbose </dev:code><dev:remarks><maml:para> Shows all user owned (non-sa, non-dbo) objects and verbose output </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaUserObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Find-DbaView</command:name><command:noun>DbaView</command:noun><command:verb>Find</command:verb><maml:description><maml:para>Returns all views that contain a specific case-insensitive string or regex pattern.</maml:para></maml:description></command:details><maml:description><maml:para>This function can either run against specific databases or all databases searching all user or user and system views.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Find-DbaView</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the view text body</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system views are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>By default system databases are ignored but you can include them within the search using this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>By default, system views are ignored but you can include them within the search using this parameter. Warning - this will likely make it super slow if you run it on all databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>String pattern that you want to search for in the view text body</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: View, Lookup Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaView -SqlInstance DEV01 -Pattern whatever </dev:code><dev:remarks><maml:para> Searches all user databases views for "whatever" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaView -SqlInstance sql2016 -Pattern '\w+@\w+\.\w+' </dev:code><dev:remarks><maml:para> Searches all databases for all views that contain a valid email pattern in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaView -SqlInstance DEV01 -Database MyDB -Pattern 'some string' -Verbose </dev:code><dev:remarks><maml:para> Searches in "mydb" database views for "some string" in the text body </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaView -SqlInstance sql2016 -Database MyDB -Pattern RUNTIME -IncludeSystemObjects </dev:code><dev:remarks><maml:para> Searches in "mydb" database views for "runtime" in the text body </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Find-DbaView</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Format-DbaBackupInformation</command:name><command:noun>DbaBackupInformation</command:noun><command:verb>Format</command:verb><maml:description><maml:para>Transforms the data in a dbatools BackupHistory object for a restore</maml:para></maml:description></command:details><maml:description><maml:para>Performs various mapping on Backup History, ready restoring</maml:para><maml:para>Options include changing restore paths, backup paths, database name and many others</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Format-DbaBackupInformation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>A dbatools backupHistory object, normally this will have been created using Select-DbaBackupInformation</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDatabaseName</maml:name><maml:description><maml:para>If a single value is provided, this will be replaced do all occurrences a database name If a Hashtable is passed in, each database name mention will be replaced as specified. If a database's name does not appear it will not be replace DatabaseName will also be replaced where it occurs in the file paths of data and log files. Please note, that this won't change the Logical Names of data files, that has to be done with a separate Alter DB call</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDbNameInFile</maml:name><maml:description><maml:para>If set, will replace the old database name with the new name if it occurs in the file name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileDirectory</maml:name><maml:description><maml:para>This will move ALL restored files to this location during the restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileDirectory</maml:name><maml:description><maml:para>This will move all log files to this location, overriding DataFileDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileStreamDirectory</maml:name><maml:description><maml:para>This move the FileStream folder and contents to the new location, overriding DataFileDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseNamePrefix</maml:name><maml:description><maml:para>This string will be prefixed to all restored database's name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseFilePrefix</maml:name><maml:description><maml:para>A string that will be prefixed to every file restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseFileSuffix</maml:name><maml:description><maml:para>A string that will be suffixed to every file restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RebaseBackupFolder</maml:name><maml:description><maml:para>Use this to rebase where your backups are stored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Indicates that this is a continuing restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileMapping</maml:name><maml:description><maml:para>A hashtable that can be used to move specific files to a location. `$FileMapping = @{'DataFile1'='c:\restoredfiles\Datafile1.mdf';'DataFile3'='d:\DataFile3.mdf'}` And files not specified in the mapping will be restored to their original location This Parameter is exclusive with DestinationDataDirectory If specified, this will override any other file renaming/relocation options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PathSep</maml:name><maml:description><maml:para>By default is Windows's style (`\`) but you can pass also, e.g., `/` for Unix's style paths</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>A dbatools backupHistory object, normally this will have been created using Select-DbaBackupInformation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Indicates that this is a continuing restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseFilePrefix</maml:name><maml:description><maml:para>A string that will be prefixed to every file restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseFileSuffix</maml:name><maml:description><maml:para>A string that will be suffixed to every file restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseNamePrefix</maml:name><maml:description><maml:para>This string will be prefixed to all restored database's name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileDirectory</maml:name><maml:description><maml:para>This will move ALL restored files to this location during the restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileStreamDirectory</maml:name><maml:description><maml:para>This move the FileStream folder and contents to the new location, overriding DataFileDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileMapping</maml:name><maml:description><maml:para>A hashtable that can be used to move specific files to a location. `$FileMapping = @{'DataFile1'='c:\restoredfiles\Datafile1.mdf';'DataFile3'='d:\DataFile3.mdf'}` And files not specified in the mapping will be restored to their original location This Parameter is exclusive with DestinationDataDirectory If specified, this will override any other file renaming/relocation options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileDirectory</maml:name><maml:description><maml:para>This will move all log files to this location, overriding DataFileDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PathSep</maml:name><maml:description><maml:para>By default is Windows's style (`\`) but you can pass also, e.g., `/` for Unix's style paths</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RebaseBackupFolder</maml:name><maml:description><maml:para>Use this to rebase where your backups are stored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDatabaseName</maml:name><maml:description><maml:para>If a single value is provided, this will be replaced do all occurrences a database name If a Hashtable is passed in, each database name mention will be replaced as specified. If a database's name does not appear it will not be replace DatabaseName will also be replaced where it occurs in the file paths of data and log files. Please note, that this won't change the Logical Names of data files, that has to be done with a separate Alter DB call</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDbNameInFile</maml:name><maml:description><maml:para>If set, will replace the old database name with the new name if it occurs in the file name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $History | Format-DbaBackupInformation -ReplaceDatabaseName NewDb </dev:code><dev:remarks><maml:para> Changes 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $History | Format-DbaBackupInformation -ReplaceDatabaseName @{'OldB'='NewDb';'ProdHr'='DevHr'} </dev:code><dev:remarks><maml:para> Will change all occurrences of original database name in the backup history (names and restore paths) using the mapping in the hashtable. In this example any occurrence of OldDb will be replaced with NewDb and ProdHr with DevPR </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $History | Format-DbaBackupInformation -DataFileDirectory 'D:\DataFiles\' -LogFileDirectory 'E:\LogFiles\ </dev:code><dev:remarks><maml:para> This example with change the restore path for all data files (everything that is not a log file) to d:\datafiles And all Transaction Log files will be restored to E:\Logfiles </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $History | Format-DbaBackupInformation -RebaseBackupFolder f:\backups </dev:code><dev:remarks><maml:para> This example changes the location that SQL Server will look for the backups. This is useful if you've moved the backups to a different location </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Format-DbaBackupInformation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgBackupHistory</command:name><command:noun>DbaAgBackupHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns backup history details for databases on a SQL Server Availability Group.</maml:para></maml:description></command:details><maml:description><maml:para>Returns backup history details for some or all databases on a SQL Server Availability Group.</maml:para><maml:para>You can even get detailed information (including file path) for latest full, differential and log files.</maml:para><maml:para>For detailed examples of the various parameters see the documentation of Get-DbaDbBackupHistory.</maml:para><maml:para>Reference: http://www.sqlhub.com/2011/07/find-your-backup-history-in-sql-server.html</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgBackupHistory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances. If you pass in one availability group listener, all replicas are automatically determined and queried. If you pass in a list of individual replicas, they will be queried. This enables you to use custom ports for the replicas.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability group to process.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases of the availability group will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaAgBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LsnSort</maml:name><maml:description><maml:para>Specifies which of the returned LSN values you would like to use for sorting when using the LastFull, LastDiff and LastLog parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaAgBackupHistory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances. If you pass in one availability group listener, all replicas are automatically determined and queried. If you pass in a list of individual replicas, they will be queried. This enables you to use custom ports for the replicas.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability group to process.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases of the availability group will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaAgBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, a large amount of information is returned, similar to what SQL Server itself returns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LsnSort</maml:name><maml:description><maml:para>Specifies which of the returned LSN values you would like to use for sorting when using the LastFull, LastDiff and LastLog parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability group to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases of the availability group will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, a large amount of information is returned, similar to what SQL Server itself returns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaAgBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LsnSort</maml:name><maml:description><maml:para>Specifies which of the returned LSN values you would like to use for sorting when using the LastFull, LastDiff and LastLog parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances. If you pass in one availability group listener, all replicas are automatically determined and queried. If you pass in a list of individual replicas, they will be queried. This enables you to use custom ports for the replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram), Andreas Jordan Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgBackupHistory -SqlInstance AgListener -AvailabilityGroup AgTest1 </dev:code><dev:remarks><maml:para> Returns information for all database backups still in msdb history on all replicas of availability group AgTest1 using the listener AgListener to determine all replicas. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgBackupHistory -SqlInstance Replica1, Replica2, Replica3 -AvailabilityGroup AgTest1 </dev:code><dev:remarks><maml:para> Returns information for all database backups still in msdb history on the given replicas of availability group AgTest1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgBackupHistory -SqlInstance 'Replica1:14331', 'Replica2:14332', 'Replica3:14333' -AvailabilityGroup AgTest1 </dev:code><dev:remarks><maml:para> Returns information for all database backups still in msdb history on the given replicas of availability group AgTest1 using custom ports. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $ListOfReplicas | Get-DbaAgBackupHistory -AvailabilityGroup AgTest1 </dev:code><dev:remarks><maml:para> Returns information for all database backups still in msdb history on the replicas in $ListOfReplicas of availability group AgTest1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $serverWithAllAgs = Connect-DbaInstance -SqlInstance MyServer </dev:code><dev:remarks><maml:para> PS C:\> $allAgResults = foreach ( $ag in $serverWithAllAgs.AvailabilityGroups ) { >> Get-DbaAgBackupHistory -SqlInstance $ag.AvailabilityReplicas.Name -AvailabilityGroup $ag.Name >> } >> PS C:\> $allAgResults | Format-Table Returns information for all database backups on all replicas for all availability groups on SQL instance MyServer. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgBackupHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgDatabase</command:name><command:noun>DbaAgDatabase</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets availability group databases from one or more SQL Server instances.</maml:para></maml:description></command:details><maml:description><maml:para>Gets availability group databases from one or more SQL Server instances.</maml:para><maml:para>Default view provides most common set of properties for information on the database in an availability group.</maml:para><maml:para>Information returned on the database will be specific to that replica, whether it is primary or a secondary.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgDatabase</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specify the database or databases to return. This list is auto-populated from the server for tab completion. Multiple databases can be specified. If none are specified all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specify the database or databases to return. This list is auto-populated from the server for tab completion. Multiple databases can be specified. If none are specified all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgDatabase -SqlInstance sql2017a </dev:code><dev:remarks><maml:para> Returns all the databases in each availability group found on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgDatabase -SqlInstance sql2017a -AvailabilityGroup AG101 </dev:code><dev:remarks><maml:para> Returns all the databases in the availability group AG101 on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlcluster -AvailabilityGroup SharePoint -Database Sharepoint_Config | Get-DbaAgDatabase </dev:code><dev:remarks><maml:para> Returns the database Sharepoint_Config found in the availability group SharePoint on server sqlcluster </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentAlert</command:name><command:noun>DbaAgentAlert</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns SQL Agent alerts on a SQL Server Agent.</maml:para></maml:description></command:details><maml:description><maml:para>This function returns SQL Agent alerts.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentAlert</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The name of the alerts to return. If null, will get all alerts from the server. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>The name of the alerts to exclude. If not provided, no alerts will be excluded. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The name of the alerts to return. If null, will get all alerts from the server. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>The name of the alerts to exclude. If not provided, no alerts will be excluded. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlert -SqlInstance ServerA,ServerB\instanceB </dev:code><dev:remarks><maml:para> Returns all SQL Agent alerts on serverA and serverB\instanceB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlert -SqlInstance ServerA,ServerB\instanceB -Alert MyAlert* </dev:code><dev:remarks><maml:para> Returns SQL Agent alert on serverA and serverB\instanceB whose names match 'MyAlert*' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'serverA','serverB\instanceB' | Get-DbaAgentAlert </dev:code><dev:remarks><maml:para> Returns all SQL Agent alerts on serverA and serverB\instanceB </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentAlert</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentAlertCategory</command:name><command:noun>DbaAgentAlertCategory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaAgentAlertCategory retrieves the alert categories.</maml:para></maml:description></command:details><maml:description><maml:para>Get-DbaAgentAlertCategory makes it possible to retrieve the alert categories.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentAlertCategory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category to filter out. If no category is used all categories will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category to filter out. If no category is used all categories will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert, AlertCategory Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlertCategory -SqlInstance sql1 </dev:code><dev:remarks><maml:para> Return all the agent alert categories. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlertCategory -SqlInstance sql1 -Category 'Severity Alert' </dev:code><dev:remarks><maml:para> Return all the agent alert categories that have the name 'Severity Alert'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentAlertCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Agent Job information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaAgentJob returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentJob</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return jobs with T-SQL job steps associated with specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Return jobs associated with specific category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCategory</maml:name><maml:description><maml:para>Categories to exclude - jobs associated with these categories will not be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDisabledJobs</maml:name><maml:description><maml:para>Switch will exclude disabled jobs from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeExecution</maml:name><maml:description><maml:para>Include Execution details if the job is currently running</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of job: MultiServer or Local. Defaults to both MultiServer and Local.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Return jobs associated with specific category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return jobs with T-SQL job steps associated with specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCategory</maml:name><maml:description><maml:para>Categories to exclude - jobs associated with these categories will not be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDisabledJobs</maml:name><maml:description><maml:para>Switch will exclude disabled jobs from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeExecution</maml:name><maml:description><maml:para>Include Execution details if the job is currently running</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of job: MultiServer or Local. Defaults to both MultiServer and Local.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Agent Jobs on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all SQl Agent Jobs for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance localhost -Job BackupData, BackupDiff </dev:code><dev:remarks><maml:para> Returns all SQL Agent Jobs named BackupData and BackupDiff from the local SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance localhost -ExcludeJob BackupDiff </dev:code><dev:remarks><maml:para> Returns all SQl Agent Jobs for the local SQL Server instances, except the BackupDiff Job. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance localhost -ExcludeDisabledJobs </dev:code><dev:remarks><maml:para> Returns all SQl Agent Jobs for the local SQL Server instances, excluding the disabled jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaAgentJob | Out-GridView -PassThru | Start-DbaAgentJob -WhatIf </dev:code><dev:remarks><maml:para> Find 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sqlserver2014a | Where-Object Category -eq "Report Server" | Export-DbaScript -Path "C:\temp\sqlserver2014a_SSRSJobs.sql" </dev:code><dev:remarks><maml:para> Exports all SSRS jobs from SQL instance sqlserver2014a to a file. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sqlserver2014a -Database msdb </dev:code><dev:remarks><maml:para> Finds all jobs on sqlserver2014a that T-SQL job steps associated with msdb database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentJobCategory</command:name><command:noun>DbaAgentJobCategory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaAgentJobCategory retrieves the job categories.</maml:para></maml:description></command:details><maml:description><maml:para>Get-DbaAgentJobCategory makes it possible to retrieve the job categories.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentJobCategory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category to filter out. If no category is used all categories will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". If no category is used all categories types will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category to filter out. If no category is used all categories will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". If no category is used all categories types will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, Category Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobCategory -SqlInstance sql1 </dev:code><dev:remarks><maml:para> Return all the job categories. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobCategory -SqlInstance sql1 -Category 'Log Shipping' </dev:code><dev:remarks><maml:para> Return all the job categories that have the name 'Log Shipping'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobCategory -SqlInstance sstad-pc -CategoryType MultiServerJob </dev:code><dev:remarks><maml:para> Return all the job categories that have a type MultiServerJob. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentJobCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentJobHistory</command:name><command:noun>DbaAgentJobHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets execution history of SQL Agent Job on instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Get-DbaAgentJobHistory returns all information on the executions still available on each instance(s) of SQL Server submitted.</maml:para><maml:para>The cleanup of SQL Agent history determines how many records are kept.</maml:para><maml:para>https://msdn.microsoft.com/en-us/library/ms201680.aspx</maml:para><maml:para>https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.agent.jobhistoryfilter(v=sql.120).aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentJobHistory</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job from which the history is wanted. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The DateTime starting from which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The DateTime before which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutcomeType</maml:name><maml:description><maml:para>The CompletionResult to filter the history for. Valid values are: Failed, Succeeded, Retry, Cancelled, InProgress, Unknown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobSteps</maml:name><maml:description><maml:para>Use this switch to discard all job steps, and return only the job totals</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithOutputFile</maml:name><maml:description><maml:para>Use this switch to retrieve the output file (only if you want step details). Bonus points, we handle the quirks of SQL Agent tokens to the best of our knowledge (https://technet.microsoft.com/it-it/library/ms175575(v=sql.110).aspx)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaAgentJobHistory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job from which the history is wanted. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The DateTime starting from which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The DateTime before which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutcomeType</maml:name><maml:description><maml:para>The CompletionResult to filter the history for. Valid values are: Failed, Succeeded, Retry, Cancelled, InProgress, Unknown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobSteps</maml:name><maml:description><maml:para>Use this switch to discard all job steps, and return only the job totals</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithOutputFile</maml:name><maml:description><maml:para>Use this switch to retrieve the output file (only if you want step details). Bonus points, we handle the quirks of SQL Agent tokens to the best of our knowledge (https://technet.microsoft.com/it-it/library/ms175575(v=sql.110).aspx)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaAgentJobHistory</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job from which the history is wanted. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The DateTime starting from which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The DateTime before which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutcomeType</maml:name><maml:description><maml:para>The CompletionResult to filter the history for. Valid values are: Failed, Succeeded, Retry, Cancelled, InProgress, Unknown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobSteps</maml:name><maml:description><maml:para>Use this switch to discard all job steps, and return only the job totals</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithOutputFile</maml:name><maml:description><maml:para>Use this switch to retrieve the output file (only if you want step details). Bonus points, we handle the quirks of SQL Agent tokens to the best of our knowledge (https://technet.microsoft.com/it-it/library/ms175575(v=sql.110).aspx)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>JobCollection</maml:name><maml:description><maml:para>An array of SMO jobs</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The DateTime before which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJobSteps</maml:name><maml:description><maml:para>Use this switch to discard all job steps, and return only the job totals</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job from which the history is wanted. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobCollection</maml:name><maml:description><maml:para>An array of SMO jobs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutcomeType</maml:name><maml:description><maml:para>The CompletionResult to filter the history for. Valid values are: Failed, Succeeded, Retry, Cancelled, InProgress, Unknown</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.CompletionResult</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The DateTime starting from which the history is wanted. If unspecified, all available records will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithOutputFile</maml:name><maml:description><maml:para>Use this switch to retrieve the output file (only if you want step details). Bonus points, we handle the quirks of SQL Agent tokens to the best of our knowledge (https://technet.microsoft.com/it-it/library/ms175575(v=sql.110).aspx)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Klaas Vandenberghe (@PowerDbaKlaas) | Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job execution results on the local default SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job execution results for the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2\Inst2K17' | Get-DbaAgentJobHistory </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job execution results for sql1 and sql2\Inst2K17. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 | Select-Object * </dev:code><dev:remarks><maml:para> Returns all properties for all SQl Agent Job execution results on sql2\Inst2K17. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 -Job 'Output File Cleanup' </dev:code><dev:remarks><maml:para> Returns all properties for all SQl Agent Job execution results of the 'Output File Cleanup' job on sql2\Inst2K17. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 -Job 'Output File Cleanup' -WithOutputFile </dev:code><dev:remarks><maml:para> Returns all properties for all SQl Agent Job execution results of the 'Output File Cleanup' job on sql2\Inst2K17, with additional properties that show the output filename path </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 -ExcludeJobSteps </dev:code><dev:remarks><maml:para> Returns the SQL Agent Job execution results for the whole jobs on sql2\Inst2K17, leaving out job step execution results. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2\Inst2K17 -StartDate '2017-05-22' -EndDate '2017-05-23 12:30:00' </dev:code><dev:remarks><maml:para> Returns the SQL Agent Job execution results between 2017/05/22 00:00:00 and 2017/05/23 12:30:00 on sql2\Inst2K17. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 | Where-Object Name -Match backup | Get-DbaAgentJobHistory </dev:code><dev:remarks><maml:para> Gets 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobHistory -SqlInstance sql2016 -OutcomeType Failed </dev:code><dev:remarks><maml:para> Returns only the failed SQL Agent Job execution results for the sql2016 SQL Server instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentJobHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentJobOutputFile</command:name><command:noun>DbaAgentJobOutputFile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the Output File for each step of one or many agent job with the Job Names provided dynamically if required for one or more SQL Instances</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para><maml:para>provided dynamically. It will not return anything if there is no Output File</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentJobOutputFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Rob Sewell (sqldbawithabeard.com) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME -Job 'The Agent Job' </dev:code><dev:remarks><maml:para> This will return the configured paths to the output files for each of the job step of the The Agent Job Job on the SERVERNAME instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME </dev:code><dev:remarks><maml:para> This will return the configured paths to the output files for each of the job step of all the Agent Jobs on the SERVERNAME instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME,SERVERNAME2 -Job 'The Agent Job' </dev:code><dev:remarks><maml:para> This will return the configured paths to the output files for each of the job step of the The Agent Job Job on the SERVERNAME instance and SERVERNAME2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME | Out-GridView </dev:code><dev:remarks><maml:para> This will return the configured paths to the output files for each of the job step of all the Agent Jobs on the SERVERNAME instance and Pipe them to Out-GridView </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME -Verbose </dev:code><dev:remarks><maml:para> This will return the configured paths to the output files for each of the job step of all the Agent Jobs on the SERVERNAME instance and also show the job steps without an output file </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentJobOutputFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentJobStep</command:name><command:noun>DbaAgentJobStep</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Agent Job Step information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaAgentJobStep returns connected SMO object for SQL Agent Job Step for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentJobStep</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDisabledJobs</maml:name><maml:description><maml:para>Switch will exclude disabled jobs from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDisabledJobs</maml:name><maml:description><maml:para>Switch will exclude disabled jobs from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Klaas Vandenberghe (@PowerDbaKlaas), powerdba.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobStep -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job Steps on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobStep -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job Steps for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobStep -SqlInstance localhost -Job BackupData, BackupDiff </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job Steps for the jobs named BackupData and BackupDiff from the local SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobStep -SqlInstance localhost -ExcludeJob BackupDiff </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job Steps for the local SQL Server instances, except for the BackupDiff Job. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobStep -SqlInstance localhost -ExcludeDisabledJobs </dev:code><dev:remarks><maml:para> Returns all SQL Agent Job Steps for the local SQL Server instances, excluding the disabled jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaAgentJobStep </dev:code><dev:remarks><maml:para> Find all of your Job Steps from SQL Server instances in the $servers collection </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentJobStep</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentLog</command:name><command:noun>DbaAgentLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the "SQL Agent Error Log" of an instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets the "SQL Agent Error Log" of an instance. Returns all 10 error logs by default.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentLog</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogNumber</maml:name><maml:description><maml:para>An Int32 value that specifies the index number of the error log required. Error logs are listed 0 through 9 where 0 is the current error log and 9 is the oldest.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogNumber</maml:name><maml:description><maml:para>An Int32 value that specifies the index number of the error log required. Error logs are listed 0 through 9 where 0 is the current error log and 9 is the oldest.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentLog -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns the entire error log for the SQL Agent on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentLog -SqlInstance sql01\sharepoint -LogNumber 3, 6 </dev:code><dev:remarks><maml:para> Returns log numbers 3 and 6 for the SQL Agent on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaAgentLog -LogNumber 0 Returns the most recent SQL Agent error logs for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentOperator</command:name><command:noun>DbaAgentOperator</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns all SQL Agent operators on a SQL Server Agent.</maml:para></maml:description></command:details><maml:description><maml:para>This function returns SQL Agent operators.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentOperator</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>The operator(s) to process - this list is auto-populated from the server. If unspecified, all operators will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operator(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operator(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>The operator(s) to process - this list is auto-populated from the server. If unspecified, all operators will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Operator Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentOperator -SqlInstance ServerA,ServerB\instanceB </dev:code><dev:remarks><maml:para> Returns any SQL Agent operators on serverA and serverB\instanceB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'ServerA','ServerB\instanceB' | Get-DbaAgentOperator </dev:code><dev:remarks><maml:para> Returns all SQL Agent operators on serverA and serverB\instanceB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentOperator -SqlInstance ServerA -Operator Dba1,Dba2 </dev:code><dev:remarks><maml:para> Returns only the SQL Agent Operators Dba1 and Dba2 on ServerA. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentOperator -SqlInstance ServerA,ServerB -ExcludeOperator Dba3 </dev:code><dev:remarks><maml:para> Returns all the SQL Agent operators on ServerA and ServerB, except the Dba3 operator. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentOperator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentProxy</command:name><command:noun>DbaAgentProxy</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns all SQL Agent proxies on a SQL Server Agent.</maml:para></maml:description></command:details><maml:description><maml:para>This function returns SQL Agent proxies.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentProxy</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Proxy</maml:name><maml:description><maml:para>The name of the proxies to return. If null, will get all proxies from the server. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxy</maml:name><maml:description><maml:para>The name of the proxies to exclude. If not provided, no proxies will be excluded. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxy</maml:name><maml:description><maml:para>The name of the proxies to exclude. If not provided, no proxies will be excluded. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Proxy</maml:name><maml:description><maml:para>The name of the proxies to return. If null, will get all proxies from the server. Note - this parameter accepts wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Proxy Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentProxy -SqlInstance ServerA,ServerB\instanceB </dev:code><dev:remarks><maml:para> Returns all SQL Agent proxies on serverA and serverB\instanceB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'serverA','serverB\instanceB' | Get-DbaAgentProxy </dev:code><dev:remarks><maml:para> Returns all SQL Agent proxies on serverA and serverB\instanceB </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentProxy</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns all SQL Agent Shared Schedules on a SQL Server Agent.</maml:para></maml:description></command:details><maml:description><maml:para>This function returns SQL Agent Shared Schedules.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentSchedule</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Parameter to filter the schedules returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleUid</maml:name><maml:description><maml:para>The unique identifier of the schedule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Parameter to filter the schedules returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Parameter to filter the schedules returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Parameter to filter the schedules returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleUid</maml:name><maml:description><maml:para>The unique identifier of the schedule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Schedule Author: Chris McKeown (@devopsfu), devopsfu.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Agent Shared Schedules on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all SQL Agent Shared Schedules for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance localhost, sql2016 -Id 3 </dev:code><dev:remarks><maml:para> Returns the SQL Agent Shared Schedules with the Id of 3 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance localhost, sql2016 -ScheduleUid 'bf57fa7e-7720-4936-85a0-87d279db7eb7' </dev:code><dev:remarks><maml:para> Returns the SQL Agent Shared Schedules with the UID </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance sql2016 -Schedule "Maintenance10min","Maintenance60min" </dev:code><dev:remarks><maml:para> Returns the "Maintenance10min" & "Maintenance60min" schedules from the sql2016 SQL Server instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgentServer</command:name><command:noun>DbaAgentServer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Agent Server information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaAgentServer returns connected SMO object for SQL Agent Server information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgentServer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Job, Agent Author: Claudio Silva (@claudioessilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentServer -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns SQL Agent Server on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentServer -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns SQL Agent Servers for the localhost and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgentServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgHadr</command:name><command:noun>DbaAgHadr</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Hadr service setting on the specified SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Hadr setting, from the service level, and returns true or false for the specified SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgHadr</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgHadr -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns a status of the Hadr setting for sql2016 SQL Server instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgHadr</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgListener</command:name><command:noun>DbaAgListener</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns availability group listeners.</maml:para></maml:description></command:details><maml:description><maml:para>Returns availability group listeners.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgListener</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>Return only specific listeners.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>Return only specific listeners.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Viorel Ciucu (@viorelciucu) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgListener -SqlInstance sql2017a </dev:code><dev:remarks><maml:para> Returns all listeners found on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgListener -SqlInstance sql2017a -AvailabilityGroup AG-a </dev:code><dev:remarks><maml:para> Returns all listeners found on sql2017a on sql2017a for the availability group AG-a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017a -AvailabilityGroup OPP | Get-DbaAgListener </dev:code><dev:remarks><maml:para> Returns all listeners found on sql2017a on sql2017a for the availability group OPP </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgListener</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAgReplica</command:name><command:noun>DbaAgReplica</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the availability group replica object found on the server.</maml:para></maml:description></command:details><maml:description><maml:para>Returns the availability group replica object found on the server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAgReplica</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>Return only specific replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Specify the availability groups to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>Return only specific replicas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2017a </dev:code><dev:remarks><maml:para> Returns basic information on all the availability group replicas found on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2017a -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> Shows basic information on the replicas found on availability group SharePoint on sql2017a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2017a | Select-Object * </dev:code><dev:remarks><maml:para> Returns full object properties on all availability group replicas found on sql2017a </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAgReplica</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns availability group objects from a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns availability group objects from a SQL Server instance.</maml:para><maml:para>Default view provides most common set of properties for information on the Availability Group(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAvailabilityGroup</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Return only specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsPrimary</maml:name><maml:description><maml:para>If this switch is enabled, a boolean indicating whether SqlInstance is the Primary replica in the AG is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Return only specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsPrimary</maml:name><maml:description><maml:para>If this switch is enabled, a boolean indicating whether SqlInstance is the Primary replica in the AG is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Shawn Melton (@wsmelton) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns basic information on all the Availability Group(s) found on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2014a -AvailabilityGroup AG-a </dev:code><dev:remarks><maml:para> Shows basic information on the Availability Group AG-a on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2014a | Select-Object * </dev:code><dev:remarks><maml:para> Returns full object properties on all Availability Group(s) on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2014a | Select-Object -ExpandProperty PrimaryReplicaServerName </dev:code><dev:remarks><maml:para> Returns the SQL Server instancename of the primary replica as a string </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2014a -AvailabilityGroup AG-a -IsPrimary </dev:code><dev:remarks><maml:para> Returns true/false if the server, sqlserver2014a, is the primary replica for AG-a Availability Group. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaAvailableCollation</command:name><command:noun>DbaAvailableCollation</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Return available collations for a given SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Returns the list of collations available on each SQL Server.</maml:para><maml:para>Only the connect permission is required to get this information.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaAvailableCollation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances. Only connect permission is required.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances. Only connect permission is required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Collation, Configuration, Management Author: Bryan Hamby (@galador) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailableCollation -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all the collations from server sql2016 using NT authentication </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaAvailableCollation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaBackupDevice</command:name><command:noun>DbaBackupDevice</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Backup Device information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaBackupDevice command gets SQL Backup Device information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaBackupDevice</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, General Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBackupDevice -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Backup Devices on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBackupDevice -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Backup Devices for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaBackupDevice</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaBackupInformation</command:name><command:noun>DbaBackupInformation</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Scan backup files and creates a set, compatible with Restore-DbaDatabase</maml:para></maml:description></command:details><maml:description><maml:para>Upon being passed a list of potential backups files this command will scan the files, select those that contain SQL Server</maml:para><maml:para>backup sets. It will then filter those files down to a set</maml:para><maml:para>The function defaults to working on a remote instance. This means that all paths passed in must be relative to the remote instance.</maml:para><maml:para>XpDirTree will be used to perform the file scans</maml:para><maml:para>Various means can be used to pass in a list of files to be considered. The default is to non recursively scan the folder</maml:para><maml:para>passed in.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaBackupInformation</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a non recursive folder scan Accepts multiple paths separated by ',' Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance to be used to read the headers of the backup files</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>An array of Database Names to filter by. If empty all databases are returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceInstance</maml:name><maml:description><maml:para>If provided only backup originating from this destination will be returned. This SQL instance will not be connected to or involved in this work</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirTree</maml:name><maml:description><maml:para>If specified, this switch will cause the files to be parsed as local files to the SQL Server Instance provided. Errors may be observed when the SQL Server Instance cannot access the files being parsed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirRecurse</maml:name><maml:description><maml:para>If specified, this switch changes xp_dirtree behavior to not recurse the folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DirectoryRecurse</maml:name><maml:description><maml:para>If specified the provided path/directory will be traversed (only applies if not using XpDirTree)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaintenanceSolution</maml:name><maml:description><maml:para>This switch tells the function that the folder is the root of a Ola Hallengren backup folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the LOG folder contains only log backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the DIFF folder contains only differential backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportPath</maml:name><maml:description><maml:para>If specified the output will export via CliXml format to the specified file. This allows you to store the backup history object for later usage, or move it between computers</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Anonymise</maml:name><maml:description><maml:para>If specified we will output the results with ComputerName, InstanceName, Database, UserName, Paths, and Logical and Physical Names hashed out This options is mainly for use if we need you to submit details for fault finding to the dbatools team</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If specified will stop Export from overwriting an existing file, the default is to overwrite</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>When data is exported the cmdlet will return no other output, this switch means it will also return the normal output which can be then piped into another command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaBackupInformation</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a non recursive folder scan Accepts multiple paths separated by ',' Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>An array of Database Names to filter by. If empty all databases are returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceInstance</maml:name><maml:description><maml:para>If provided only backup originating from this destination will be returned. This SQL instance will not be connected to or involved in this work</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaintenanceSolution</maml:name><maml:description><maml:para>This switch tells the function that the folder is the root of a Ola Hallengren backup folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the LOG folder contains only log backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the DIFF folder contains only differential backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportPath</maml:name><maml:description><maml:para>If specified the output will export via CliXml format to the specified file. This allows you to store the backup history object for later usage, or move it between computers</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Import</maml:name><maml:description><maml:para>When specified along with a path the command will import a previously exported BackupHistory object from an xml file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Anonymise</maml:name><maml:description><maml:para>If specified we will output the results with ComputerName, InstanceName, Database, UserName, Paths, and Logical and Physical Names hashed out This options is mainly for use if we need you to submit details for fault finding to the dbatools team</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If specified will stop Export from overwriting an existing file, the default is to overwrite</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>When data is exported the cmdlet will return no other output, this switch means it will also return the normal output which can be then piped into another command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Anonymise</maml:name><maml:description><maml:para>If specified we will output the results with ComputerName, InstanceName, Database, UserName, Paths, and Logical and Physical Names hashed out This options is mainly for use if we need you to submit details for fault finding to the dbatools team</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>An array of Database Names to filter by. If empty all databases are returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DirectoryRecurse</maml:name><maml:description><maml:para>If specified the provided path/directory will be traversed (only applies if not using XpDirTree)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportPath</maml:name><maml:description><maml:para>If specified the output will export via CliXml format to the specified file. This allows you to store the backup history object for later usage, or move it between computers</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the DIFF folder contains only differential backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>This switch only works with the MaintenanceSolution switch. With an Ola Hallengren style backup we can be sure that the LOG folder contains only log backups and skip it. For all other scenarios we need to read the file headers to be sure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Import</maml:name><maml:description><maml:para>When specified along with a path the command will import a previously exported BackupHistory object from an xml file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaintenanceSolution</maml:name><maml:description><maml:para>This switch tells the function that the folder is the root of a Ola Hallengren backup folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoClobber</maml:name><maml:description><maml:para>If specified will stop Export from overwriting an existing file, the default is to overwrite</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirRecurse</maml:name><maml:description><maml:para>If specified, this switch changes xp_dirtree behavior to not recurse the folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirTree</maml:name><maml:description><maml:para>If specified, this switch will cause the files to be parsed as local files to the SQL Server Instance provided. Errors may be observed when the SQL Server Instance cannot access the files being parsed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>When data is exported the cmdlet will return no other output, this switch means it will also return the normal output which can be then piped into another command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a non recursive folder scan Accepts multiple paths separated by ',' Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceInstance</maml:name><maml:description><maml:para>If provided only backup originating from this destination will be returned. This SQL instance will not be connected to or involved in this work</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance to be used to read the headers of the backup files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBackupInformation -SqlInstance Server1 -Path c:\backups\ -DirectoryRecurse </dev:code><dev:remarks><maml:para> Will use the Server1 instance to recursively read all backup files under c:\backups, and return a dbatools BackupHistory object </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBackupInformation -SqlInstance Server1 -Path c:\backups\ -DirectoryRecurse -ExportPath c:\store\BackupHistory.xml </dev:code><dev:remarks><maml:para> PS C:\> robocopy c:\store\ \\remoteMachine\C$\store\ BackupHistory.xml PS C:\> Get-DbaBackupInformation -Import -Path c:\store\BackupHistory.xml | Restore-DbaDatabase -SqlInstance Server2 -TrustDbBackupHistory This 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBackupInformation -SqlInstance Server1 -Path c:\backups\ -DirectoryRecurse -ExportPath C:\store\BackupHistory.xml -PassThru | Restore-DbaDatabase -SqlInstance Server2 -TrustDbBackupHistory </dev:code><dev:remarks><maml:para> In this example we gather backup information, export it to an xml file, and then pass it on through to Restore-DbaDatabase. This allows us to repeat the restore without having to scan all the backup files again </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem c:\backups\ -recurse -files | Where-Object {$_.extension -in ('.bak','.trn') -and $_.LastWriteTime -gt (get-date).AddMonths(-1)} | Get-DbaBackupInformation -SqlInstance Server1 -ExportPath C:\backupHistory.xml </dev:code><dev:remarks><maml:para> This lets you keep a record of all backup history from the last month on hand to speed up refreshes </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\network\backups </dev:code><dev:remarks><maml:para> PS C:\> $Backups += Get-DbaBackupInformation -SqlInstance Server2 -NoXpDirTree -Path c:\backups Scan the unc folder \\network\backups with Server1, and then scan the C:\backups folder on Server2 not using xp_dirtree, adding the results to the first set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\network\backups -MaintenanceSolution </dev:code><dev:remarks><maml:para> When 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 shortcut scanning all the files as we have nothing to work with </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\network\backups -MaintenanceSolution -IgnoreLogBackup </dev:code><dev:remarks><maml:para> As 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 log backups. Note this also means they WON'T be restored </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaBackupInformation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaBinaryFileTable</command:name><command:noun>DbaBinaryFileTable</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets a table with binary columns which can be used with Export-DbaBinaryFile and Import-DbaBinaryFile.</maml:para></maml:description></command:details><maml:description><maml:para>Gets a table with binary columns which can be used with Export-DbaBinaryFile and Import-DbaBinaryFile.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaBinaryFileTable</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBinaryFileTable -SqlInstance sqlcs -Database test </dev:code><dev:remarks><maml:para> Returns a table with binary columns which can be used with Export-DbaBinaryFile and Import-DbaBinaryFile. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBinaryFileTable -SqlInstance sqlcs -Database test | Out-GridView -Passthru | Export-DbaBinaryFile -Path C:\temp </dev:code><dev:remarks><maml:para> Allows you to pick tables with columns to be exported by Export-DbaBinaryFile </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaBinaryFileTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaBuild</command:name><command:noun>DbaBuild</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns SQL Server Build infos on a SQL instance</maml:para></maml:description></command:details><maml:description><maml:para>Returns info about the specific build of a SQL instance, including the SP, the CU and the reference KB, wherever possible.</maml:para><maml:para>It also includes End Of Support dates as specified on Microsoft Life Cycle Policy</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaBuild</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Build</maml:name><maml:description><maml:para>Instead of connecting to a real instance, pass a string identifying the build to get the info back.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Version[]</command:parameterValue><dev:type><maml:name>System.Version[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Kb</maml:name><maml:description><maml:para>Get a KB information based on its number. Supported format: KBXXXXXX, or simply XXXXXX.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MajorVersion</maml:name><maml:description><maml:para>Get a KB information based on SQL Server version. Can be refined further by -ServicePack and -CumulativeUpdate parameters. Examples: SQL2008 | 2008R2 | 2016</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServicePack</maml:name><maml:description><maml:para>Get a KB information based on SQL Server Service Pack version. Can be refined further by -CumulativeUpdate parameter. Examples: SP0 | 2 | RTM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CumulativeUpdate</maml:name><maml:description><maml:para>Get a KB information based on SQL Server Cumulative Update version. Examples: CU0 | CU13 | CU0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their build state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Adding this switch will look online for the most up to date reference, optionally replacing the local one.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Build</maml:name><maml:description><maml:para>Instead of connecting to a real instance, pass a string identifying the build to get the info back.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Version[]</command:parameterValue><dev:type><maml:name>System.Version[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CumulativeUpdate</maml:name><maml:description><maml:para>Get a KB information based on SQL Server Cumulative Update version. Examples: CU0 | CU13 | CU0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Kb</maml:name><maml:description><maml:para>Get a KB information based on its number. Supported format: KBXXXXXX, or simply XXXXXX.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MajorVersion</maml:name><maml:description><maml:para>Get a KB information based on SQL Server version. Can be refined further by -ServicePack and -CumulativeUpdate parameters. Examples: SQL2008 | 2008R2 | 2016</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServicePack</maml:name><maml:description><maml:para>Get a KB information based on SQL Server Service Pack version. Can be refined further by -CumulativeUpdate parameter. Examples: SP0 | 2 | RTM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their build state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Adding this switch will look online for the most up to date reference, optionally replacing the local one.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlBuild, Utility Author: Simone Bizzotto (@niphold) | Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBuild -Build "12.00.4502" </dev:code><dev:remarks><maml:para> Returns information about a build identified by "12.00.4502" (which is SQL 2014 with SP1 and CU11) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBuild -Build "12.00.4502" -Update </dev:code><dev:remarks><maml:para> Returns 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaBuild -Build "12.0.4502","10.50.4260" </dev:code><dev:remarks><maml:para> Returns information builds identified by these versions strings </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a | Get-DbaBuild </dev:code><dev:remarks><maml:para> Integrate with other cmdlets to have builds checked for all your registered servers on sqlserver2014a </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaBuild</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaClientAlias</command:name><command:noun>DbaClientAlias</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets any SQL Server alias for the specified server(s)</maml:para></maml:description></command:details><maml:description><maml:para>Gets SQL Server alias by reading HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaClientAlias</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias has been created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias has been created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlClient, Alias Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientAlias </dev:code><dev:remarks><maml:para> Gets all SQL Server client aliases on the local computer </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientAlias -ComputerName workstationx </dev:code><dev:remarks><maml:para> Gets all SQL Server client aliases on Workstationx </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientAlias -ComputerName workstationx -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Logs into workstationx as ad\sqldba then retrieves all SQL Server client aliases on Workstationx </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Server1', 'Server2' | Get-DbaClientAlias </dev:code><dev:remarks><maml:para> Gets all SQL Server client aliases on Server1 and Server2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaClientAlias</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaClientProtocol</command:name><command:noun>DbaClientProtocol</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the SQL Server related client protocols on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the SQL Server related client protocols on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para><maml:para>The client protocols can be enabled and disabled when retrieved via WSMan.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaClientProtocol</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, Protocol, OS Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientProtocol -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the SQL Server related client protocols on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaClientProtocol </dev:code><dev:remarks><maml:para> Gets the SQL Server related client protocols on computers sql1, sql2 and sql3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientProtocol -ComputerName sql1,sql2 | Out-GridView </dev:code><dev:remarks><maml:para> Gets the SQL Server related client protocols on computers sql1 and sql2, and shows them in a grid view. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> (Get-DbaClientProtocol -ComputerName sql2 | Where-Object { $_.DisplayName -eq 'Named Pipes' }).Disable() </dev:code><dev:remarks><maml:para> Disables the VIA ClientNetworkProtocol on computer sql2. If successful, return code 0 is shown. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaClientProtocol</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCmConnection</command:name><command:noun>DbaCmConnection</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Retrieves windows management connections from the cache</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves windows management connections from the cache</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCmConnection</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computername to ComputerName for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UserName</maml:name><maml:description><maml:para>Username on credentials to look for. Will not find connections using the default windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computername to ComputerName for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UserName</maml:name><maml:description><maml:para>Username on credentials to look for. Will not find connections using the default windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection </dev:code><dev:remarks><maml:para> List all cached connections. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection sql2014 </dev:code><dev:remarks><maml:para> List the cached connection - if any - to the server sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection -UserName "*charles*" </dev:code><dev:remarks><maml:para> List all cached connection that use a username containing "charles" as default or override credentials. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCmConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCmObject</command:name><command:noun>DbaCmObject</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Retrieves Wmi/Cim-Style information from computers.</maml:para></maml:description></command:details><maml:description><maml:para>This function centralizes all requests for information retrieved from Get-WmiObject or Get-CimInstance.</maml:para><maml:para>It uses different protocols as available in this order:</maml:para><maml:para>- Cim over WinRM</maml:para><maml:para>- Cim over DCOM</maml:para><maml:para>- Wmi</maml:para><maml:para>- Wmi over PowerShell Remoting</maml:para><maml:para>It remembers channels that didn't work and will henceforth avoid them. It remembers invalid credentials and will avoid reusing them.</maml:para><maml:para>Much of its behavior can be configured using Test-DbaCmConnection.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCmObject</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClassName</maml:name><maml:description><maml:para>The name of the class to retrieve.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer(s) to connect to. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credentials to use. Invalid credentials will be stored in a credentials cache and not be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Namespace</maml:name><maml:description><maml:para>The namespace of the class to use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DoNotUse</maml:name><maml:description><maml:para>Connection Protocols that should not be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides some checks that might otherwise halt execution as a precaution - Ignores timeout on bad connections</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SilentlyContinue</maml:name><maml:description><maml:para>Use in conjunction with the -EnableException switch. By default, Get-DbaCmObject will throw a terminating exception when connecting to a target is impossible in exception enabled mode. Setting this switch will cause it write a non-terminating exception and continue with the next computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaCmObject</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>The Wmi/Cim query to run against the server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer(s) to connect to. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credentials to use. Invalid credentials will be stored in a credentials cache and not be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Namespace</maml:name><maml:description><maml:para>The namespace of the class to use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DoNotUse</maml:name><maml:description><maml:para>Connection Protocols that should not be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides some checks that might otherwise halt execution as a precaution - Ignores timeout on bad connections</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SilentlyContinue</maml:name><maml:description><maml:para>Use in conjunction with the -EnableException switch. By default, Get-DbaCmObject will throw a terminating exception when connecting to a target is impossible in exception enabled mode. Setting this switch will cause it write a non-terminating exception and continue with the next computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClassName</maml:name><maml:description><maml:para>The name of the class to retrieve.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer(s) to connect to. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credentials to use. Invalid credentials will be stored in a credentials cache and not be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DoNotUse</maml:name><maml:description><maml:para>Connection Protocols that should not be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides some checks that might otherwise halt execution as a precaution - Ignores timeout on bad connections</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Namespace</maml:name><maml:description><maml:para>The namespace of the class to use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>The Wmi/Cim query to run against the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SilentlyContinue</maml:name><maml:description><maml:para>Use in conjunction with the -EnableException switch. By default, Get-DbaCmObject will throw a terminating exception when connecting to a target is impossible in exception enabled mode. Setting this switch will cause it write a non-terminating exception and continue with the next computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmObject win32_OperatingSystem </dev:code><dev:remarks><maml:para> Retrieves the common operating system information from the local computer. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmObject -Computername "sql2014" -ClassName Win32_OperatingSystem -Credential $cred -DoNotUse CimRM </dev:code><dev:remarks><maml:para> Retrieves the common operating system information from the server sql2014. It 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). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCmObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaComputerCertificate</command:name><command:noun>DbaComputerCertificate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Simplifies finding computer certificates that are candidates for using with SQL Server's network encryption</maml:para></maml:description></command:details><maml:description><maml:para>Gets computer certificates on localhost that are candidates for using with SQL Server's network encryption</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaComputerCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of certificates to return. All or Service. Default is Service since this is SQL specific.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to a certificate - basically changes the path into a certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Return certificate based on thumbprint</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to a certificate - basically changes the path into a certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Return certificate based on thumbprint</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of certificates to return. All or Service. Default is Service since this is SQL specific.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate </dev:code><dev:remarks><maml:para> Gets computer certificates on localhost that are candidates for using with SQL Server's network encryption </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate -ComputerName sql2016 </dev:code><dev:remarks><maml:para> Gets computer certificates on sql2016 that are candidates for using with SQL Server's network encryption </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate -ComputerName sql2016 -Thumbprint 8123472E32AB412ED4288888B83811DB8F504DED, 04BFF8B3679BB01A986E097868D8D494D70A46D6 </dev:code><dev:remarks><maml:para> Gets computer certificates on sql2016 that match thumbprints 8123472E32AB412ED4288888B83811DB8F504DED or 04BFF8B3679BB01A986E097868D8D494D70A46D6 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaComputerCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaComputerSystem</command:name><command:noun>DbaComputerSystem</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets computer system information from the server.</maml:para></maml:description></command:details><maml:description><maml:para>Gets computer system information from the server and returns as an object.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaComputerSystem</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeAws</maml:name><maml:description><maml:para>If computer is hosted in AWS Infrastructure as a Service (IaaS), additional information will be included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeAws</maml:name><maml:description><maml:para>If computer is hosted in AWS Infrastructure as a Service (IaaS), additional information will be included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, Computer, OS Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerSystem </dev:code><dev:remarks><maml:para> Returns information about the local computer's computer system </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerSystem -ComputerName sql2016 </dev:code><dev:remarks><maml:para> Returns information about the sql2016's computer system </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerSystem -ComputerName sql2016 -IncludeAws </dev:code><dev:remarks><maml:para> Returns information about the sql2016's computer system and includes additional properties around the EC2 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaComputerSystem</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaConnectedInstance</command:name><command:noun>DbaConnectedInstance</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get a list of all connected instances</maml:para></maml:description></command:details><maml:description><maml:para>Get a list of all connected instances</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaConnectedInstance</maml:name></command:syntaxItem></command:syntax><command:parameters></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaConnectedInstance </dev:code><dev:remarks><maml:para> Gets all connected SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaConnectedInstance | Select * </dev:code><dev:remarks><maml:para> Gets all connected SQL Server instances and shows the associated connectionstrings as well </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaConnectedInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaConnection</command:name><command:noun>DbaConnection</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a bunch of information from dm_exec_connections.</maml:para></maml:description></command:details><maml:description><maml:para>Returns a bunch of information from dm_exec_connections which, according to Microsoft:</maml:para><maml:para>"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."</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaConnection</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server(s) must be SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server(s) must be SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaConnection -SqlInstance sql2016, sql2017 </dev:code><dev:remarks><maml:para> Returns client connection information from sql2016 and sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCpuRingBuffer</command:name><command:noun>DbaCpuRingBuffer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Collects CPU data from sys.dm_os_ring_buffers. Works on SQL Server 2005 and above.</maml:para></maml:description></command:details><maml:description><maml:para>This command is based off of Glen Berry's diagnostic query for average CPU</maml:para><maml:para>The sys.dm_os_ring_buffers stores the average CPU utilization history</maml:para><maml:para>by the current instance of SQL Server, plus the summed average CPU utilization</maml:para><maml:para>by all other processes on your machine are captured in one minute increments</maml:para><maml:para>for the past 256 minutes.</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/glenn/sql-server-diagnostic-information-queries-detailed-day-16//</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCpuRingBuffer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. To use: $cred = Get-Credential, this pass this $cred to the param. Windows Authentication will be used if DestinationSqlCredential is not specified. To connect as a different Windows user, run PowerShell as that user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionMinutes</maml:name><maml:description><maml:para>Allows you to specify a Collection Period in Minutes. Default is 60 minutes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionMinutes</maml:name><maml:description><maml:para>Allows you to specify a Collection Period in Minutes. Default is 60 minutes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. To use: $cred = Get-Credential, this pass this $cred to the param. Windows Authentication will be used if DestinationSqlCredential is not specified. To connect as a different Windows user, run PowerShell as that user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Buffer, CPU Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCpuRingBuffer -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Gets CPU Statistics from sys.dm_os_ring_buffers for servers sql2008 and sqlserver2012 for last 60 minutes. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCpuRingBuffer -SqlInstance sql2008 -CollectionMinutes 240 </dev:code><dev:remarks><maml:para> Gets CPU Statistics from sys.dm_os_ring_buffers for server sql2008 for last 240 minutes </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaCpuRingBuffer -SqlInstance sql2008 -CollectionMinutes 240 | Select-Object * | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Gets CPU Statistics from sys.dm_os_ring_buffers for server sql2008 for last 240 minutes into a Data Table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008','sql2012' | Get-DbaCpuRingBuffer </dev:code><dev:remarks><maml:para> Gets CPU Statistics from sys.dm_os_ring_buffers for servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaCpuRingBuffer -SqlInstance sql2008 -SqlCredential $cred Connects using sqladmin credential and returns CPU Statistics from sys.dm_os_ring_buffers from sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCpuRingBuffer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCpuUsage</command:name><command:noun>DbaCpuUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Provides detailed CPU usage information about a SQL Server's process</maml:para></maml:description></command:details><maml:description><maml:para>"If there are a lot of processes running on your instance and the CPU is very high,</maml:para><maml:para>then it's hard to find the exact process eating up your CPU using just the SQL Server</maml:para><maml:para>tools. One way to correlate the data between what is running within SQL Server and at</maml:para><maml:para>the Windows level is to use SPID and KPID values to get the exact process."</maml:para><maml:para>This command automates that process.</maml:para><maml:para>References: https://www.mssqltips.com/sqlservertip/2454/how-to-find-out-how-much-cpu-a-sql-server-process-is-really-using/</maml:para><maml:para>Note: This command returns results from all SQL instances on the destination server but the process</maml:para><maml:para>column is specific to -SqlInstance passed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCpuUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the Windows Server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>CPU threshold.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the Windows Server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>CPU threshold.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Performance, CPU Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCpuUsage -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Logs into the SQL Server instance "sql2017" and also the Computer itself (via WMI) to gather information </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $usage = Get-DbaCpuUsage -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> PS C:\> $usage.Process Explores the processes (from Get-DbaProcess) associated with the usage results </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCpuUsage -SqlInstance sql2017 -SqlCredential sqladmin -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Logs into the SQL instance using the SQL Login 'sqladmin' and then Windows instance as 'ad\sqldba' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCpuUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCredential</command:name><command:noun>DbaCredential</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Credential information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaCredential command gets SQL Credential information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCredential</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Only include specific names Note: if spaces exist in the credential name, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCredential</maml:name><maml:description><maml:para>Excluded credential names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Only include specific names Note: if spaces exist in the credential name, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCredential</maml:name><maml:description><maml:para>Excluded credential names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Security, Credential Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCredential -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Credentials on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCredential -SqlInstance localhost, sql2016 -Name 'PowerShell Proxy' </dev:code><dev:remarks><maml:para> Returns the SQL Credentials named 'PowerShell Proxy' for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCredential -SqlInstance localhost, sql2016 -Identity ad\powershell </dev:code><dev:remarks><maml:para> Returns the SQL Credentials for the account 'ad\powershell' on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCredential</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaCustomError</command:name><command:noun>DbaCustomError</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Custom Error Message information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaCustomError command gets SQL Custom Error Message information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaCustomError</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Error Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCustomError -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Custom Error Message(s) on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCustomError -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Custom Error Message(s) for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaCustomError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Database information for each database that is present on the target instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaDatabase command gets SQL database information for each database that is present on the target instance(s) of</maml:para><maml:para>SQL Server. If the name of the database is provided, the command will return only the specific database information.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeUser</maml:name><maml:description><maml:para>If this switch is enabled, only databases which are not User databases will be processed. This parameter cannot be used with -ExcludeSystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>If this switch is enabled, only databases which are not System databases will be processed. This parameter cannot be used with -ExcludeUser.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Specifies one or more database owners. Only databases owned by the listed owner(s) will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encrypted</maml:name><maml:description><maml:para>If this switch is enabled, only databases which have Transparent Data Encryption (TDE) enabled will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Specifies one or more database statuses to filter on. Only databases in the status(es) listed will be returned. Valid options for this parameter are 'Emergency', 'Normal', 'Offline', 'Recovering', 'Restoring', 'Standby', and 'Suspect'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Access</maml:name><maml:description><maml:para>Filters databases returned by their access type. Valid options for this parameter are 'ReadOnly' and 'ReadWrite'. If omitted, no filtering is performed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Filters databases returned by their recovery model. Valid options for this parameter are 'Full', 'Simple', and 'BulkLogged'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFullBackup</maml:name><maml:description><maml:para>If this switch is enabled, only databases without a full backup recorded by SQL Server will be returned. This will also indicate which of these databases only have CopyOnly full backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFullBackupSince</maml:name><maml:description><maml:para>Only databases which haven't had a full backup since the specified DateTime will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLogBackup</maml:name><maml:description><maml:para>If this switch is enabled, only databases without a log backup recorded by SQL Server will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLogBackupSince</maml:name><maml:description><maml:para>Only databases which haven't had a log backup since the specified DateTime will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeLastUsed</maml:name><maml:description><maml:para>If this switch is enabled, the last used read & write times for each database will be returned. This data is retrieved from sys.dm_db_index_usage_stats which is reset when SQL Server is restarted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlyAccessible</maml:name><maml:description><maml:para>If this switch is enabled, only accessible databases are returned (huge speedup in SMO enumeration)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Access</maml:name><maml:description><maml:para>Filters databases returned by their access type. Valid options for this parameter are 'ReadOnly' and 'ReadWrite'. If omitted, no filtering is performed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encrypted</maml:name><maml:description><maml:para>If this switch is enabled, only databases which have Transparent Data Encryption (TDE) enabled will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>If this switch is enabled, only databases which are not System databases will be processed. This parameter cannot be used with -ExcludeUser.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeUser</maml:name><maml:description><maml:para>If this switch is enabled, only databases which are not User databases will be processed. This parameter cannot be used with -ExcludeSystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeLastUsed</maml:name><maml:description><maml:para>If this switch is enabled, the last used read & write times for each database will be returned. This data is retrieved from sys.dm_db_index_usage_stats which is reset when SQL Server is restarted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFullBackup</maml:name><maml:description><maml:para>If this switch is enabled, only databases without a full backup recorded by SQL Server will be returned. This will also indicate which of these databases only have CopyOnly full backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFullBackupSince</maml:name><maml:description><maml:para>Only databases which haven't had a full backup since the specified DateTime will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLogBackup</maml:name><maml:description><maml:para>If this switch is enabled, only databases without a log backup recorded by SQL Server will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLogBackupSince</maml:name><maml:description><maml:para>Only databases which haven't had a log backup since the specified DateTime will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlyAccessible</maml:name><maml:description><maml:para>If this switch is enabled, only accessible databases are returned (huge speedup in SMO enumeration)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Specifies one or more database owners. Only databases owned by the listed owner(s) will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Filters databases returned by their recovery model. Valid options for this parameter are 'Full', 'Simple', and 'BulkLogged'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Specifies one or more database statuses to filter on. Only databases in the status(es) listed will be returned. Valid options for this parameter are 'Emergency', 'Normal', 'Offline', 'Recovering', 'Restoring', 'Standby', and 'Suspect'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com | Klaas Vandenberghe (@PowerDbaKlaas) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all databases on the local default SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -ExcludeUser </dev:code><dev:remarks><maml:para> Returns only the system databases on the local default SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -ExcludeSystem </dev:code><dev:remarks><maml:para> Returns only the user databases on the local default SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','sql2016' | Get-DbaDatabase </dev:code><dev:remarks><maml:para> Returns databases on multiple instances piped into the function. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress -RecoveryModel full,Simple </dev:code><dev:remarks><maml:para> Returns only the user databases in Full or Simple recovery model from SQL Server instance SQL1\SQLExpress. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress -Status Normal </dev:code><dev:remarks><maml:para> Returns only the user databases with status 'normal' from SQL Server instance SQL1\SQLExpress. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress -IncludeLastUsed </dev:code><dev:remarks><maml:para> Returns the databases from SQL Server instance SQL1\SQLExpress and includes the last used information from the sys.dm_db_index_usage_stats DMV. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress,SQL2 -ExcludeDatabase model,master </dev:code><dev:remarks><maml:para> Returns all databases except master and model from SQL Server instances SQL1\SQLExpress and SQL2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress,SQL2 -Encrypted </dev:code><dev:remarks><maml:para> Returns only databases using TDE from SQL Server instances SQL1\SQLExpress and SQL2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress,SQL2 -Access ReadOnly </dev:code><dev:remarks><maml:para> Returns only read only databases from SQL Server instances SQL1\SQLExpress and SQL2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL2,SQL3 -Database OneDB,OtherDB </dev:code><dev:remarks><maml:para> Returns databases 'OneDb' and 'OtherDB' from SQL Server instances SQL2 and SQL3 if databases by those names exist on those instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbAssembly</command:name><command:noun>DbaDbAssembly</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Database Assembly information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaDbAssembly command gets SQL Database Assembly information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbAssembly</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specify a Database to be checked for assembly. If not specified, all databases in the specified Instance(s) will be checked</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specify an Assembly to be fetched. If not specified all Assemblies will be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong, we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specify a Database to be checked for assembly. If not specified, all databases in the specified Instance(s) will be checked</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong, we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specify an Assembly to be fetched. If not specified all Assemblies will be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Assembly, Database Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAssembly -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Database Assembly on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAssembly -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Database Assembly for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAssembly -SqlInstance Server1 -Database MyDb -Name MyTechCo.Houids.SQLCLR </dev:code><dev:remarks><maml:para> Will fetch details for the MyTechCo.Houids.SQLCLR assembly in the MyDb Database on the Server1 instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbAssembly</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbAsymmetricKey</command:name><command:noun>DbaDbAsymmetricKey</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database Asymmetric Key</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Asymmetric Key</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbAsymmetricKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get Asymmetric Keys from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving Asymmetric Keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Get specific Asymmetric Key by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get Asymmetric Keys from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving Asymmetric Keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Get specific Asymmetric Key by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAsymmetricKey -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all Asymmetric Keys </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAsymmetricKey -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the Asymmetric Keys for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAsymmetricKey -SqlInstance Server1 -Database db1 -Name key1 </dev:code><dev:remarks><maml:para> Gets the key1 Asymmetric Key within the db1 database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbAsymmetricKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbBackupHistory</command:name><command:noun>DbaDbBackupHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns backup history details for databases on a SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Returns backup history details for some or all databases on a SQL Server.</maml:para><maml:para>You can even get detailed information (including file path) for latest full, differential and log files.</maml:para><maml:para>Backups taken with the CopyOnly option will NOT be returned, unless the IncludeCopyOnly switch is present.</maml:para><maml:para>Reference: http://www.sqlhub.com/2011/07/find-your-backup-history-in-sql-server.html</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbBackupHistory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaDbBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgCheck</maml:name><maml:description><maml:para>Deprecated. The functionality to also get the history from all replicas if SqlInstance is part on an availability group has been moved to Get-DbaAgBackupHistory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>When this switch is enabled, Differential backups will be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaDbBackupHistory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaDbBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, a large amount of information is returned, similar to what SQL Server itself returns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgCheck</maml:name><maml:description><maml:para>Deprecated. The functionality to also get the history from all replicas if SqlInstance is part on an availability group has been moved to Get-DbaAgBackupHistory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>When this switch is enabled, Differential backups will be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgCheck</maml:name><maml:description><maml:para>Deprecated. The functionality to also get the history from all replicas if SqlInstance is part on an availability group has been moved to Get-DbaAgBackupHistory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceType. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device','URL', in addition to custom integers for your own DeviceType.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, a large amount of information is returned, similar to what SQL Server itself returns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>When this switch is enabled, Differential backups will be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>By default Get-DbaDbBackupHistory will ignore backups taken with the CopyOnly option. This switch will include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeMirror</maml:name><maml:description><maml:para>By default mirrors of backups are not returned, this switch will cause them to be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full chain of full, diff and log backup sets is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastDiff</maml:name><maml:description><maml:para>If this switch is enabled, the most recent differential backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastFull</maml:name><maml:description><maml:para>If this switch is enabled, the most recent full backup set is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLog</maml:name><maml:description><maml:para>If this switch is enabled, the most recent log backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastLsn</maml:name><maml:description><maml:para>Specifies a minimum LSN to use in filtering backup history. Only backups with an LSN greater than this value will be returned, which helps speed the retrieval process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bigint</command:parameterValue><dev:type><maml:name>Bigint</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, one object per backup file is returned. Otherwise, media sets (striped backups across multiple files) will be grouped into a single return object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryFork</maml:name><maml:description><maml:para>Specifies the Recovery Fork you want backup history for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a DateTime object to use as the starting point for the search for backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies one or more types of backups to return. Valid options are 'Full', 'Log', 'Differential', 'File', 'Differential File', 'Partial Full', and 'Partial Differential'. Otherwise, all types of backups will be returned unless one of the -Last* switches is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup Author: Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance SqlInstance2014a </dev:code><dev:remarks><maml:para> Returns 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 other examples. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> Get-DbaDbBackupHistory -SqlInstance SqlInstance2014a -SqlCredential $cred Does the same as above but connect to SqlInstance2014a as SQL user "sqladmin" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance SqlInstance2014a -Database db1, db2 -Since '2016-07-01 10:47:00' </dev:code><dev:remarks><maml:para> Returns backup information only for databases db1 and db2 on SqlInstance2014a since July 1, 2016 at 10:47 AM. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014, pubs -Force | Format-Table </dev:code><dev:remarks><maml:para> Returns information only for AdventureWorks2014 and pubs and formats the results as a table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last </dev:code><dev:remarks><maml:para> Returns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last -DeviceType Disk </dev:code><dev:remarks><maml:para> Returns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014, but only for backups to disk. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Last -DeviceType 148,107 </dev:code><dev:remarks><maml:para> Returns information about the most recent full, differential and log backups for AdventureWorks2014 on sql2014, but only for backups with device_type 148 and 107. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -LastFull </dev:code><dev:remarks><maml:para> Returns information about the most recent full backup for AdventureWorks2014 on sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2014 -Database AdventureWorks2014 -Type Full </dev:code><dev:remarks><maml:para> Returns information about all Full backups for AdventureWorks2014 on sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2016 | Get-DbaDbBackupHistory </dev:code><dev:remarks><maml:para> Returns database backup information for every database on every server listed in the Central Management Server on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance SqlInstance2014a, sql2016 -Force </dev:code><dev:remarks><maml:para> Returns detailed backup history for all databases on SqlInstance2014a and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory -SqlInstance sql2016 -Database db1 -RecoveryFork 38e5e84a-3557-4643-a5d5-eed607bef9c6 -Last </dev:code><dev:remarks><maml:para> If db1 has multiple recovery forks, specifying the RecoveryFork GUID will restrict the search to that fork. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbBackupHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccHelp</command:name><command:noun>DbaDbccHelp</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC HELP</maml:para></maml:description></command:details><maml:description><maml:para>Returns the results of DBCC HELP</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-help-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccHelp</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Statement</maml:name><maml:description><maml:para>Is the name of the DBCC command for which to receive syntax information. Provide only the part of the DBCC command that follows DBCC, for example, CHECKDB instead of DBCC CHECKDB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeUndocumented</maml:name><maml:description><maml:para>Allows getting help for undocumented DBCC commands. Requires Traceflag 2588 This only works for SQL Server 2005 or Higher</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeUndocumented</maml:name><maml:description><maml:para>Allows getting help for undocumented DBCC commands. Requires Traceflag 2588 This only works for SQL Server 2005 or Higher</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Statement</maml:name><maml:description><maml:para>Is the name of the DBCC command for which to receive syntax information. Provide only the part of the DBCC command that follows DBCC, for example, CHECKDB instead of DBCC CHECKDB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccHelp -SqlInstance SQLInstance -Statement FREESYSTEMCACHE -Verbose | Format-List </dev:code><dev:remarks><maml:para> Runs the command DBCC HELP(FREESYSTEMCACHE) WITH NO_INFOMSGS against the SQL Server instance SQLInstance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccHelp -SqlInstance LensmanSB -Statement WritePage -IncludeUndocumented | Format-List </dev:code><dev:remarks><maml:para> Sets TraeFlag 2588 on for session and then runs the command DBCC HELP(WritePage) WITH NO_INFOMSGS against the SQL Server instance SQLInstance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccHelp</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccMemoryStatus</command:name><command:noun>DbaDbccMemoryStatus</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the results of DBCC MEMORYSTATUS. Works on SQL Server 2000-2019.</maml:para></maml:description></command:details><maml:description><maml:para>This command is used to run the DBCC MEMORYSTATUS comand and collect results in a single usable recordset</maml:para><maml:para>Reference:</maml:para><maml:para> - https://blogs.msdn.microsoft.com/timchapman/2012/08/16/how-to-parse-dbcc-memorystatus-via-powershell/</maml:para><maml:para> - https://support.microsoft.com/en-us/help/907877/how-to-use-the-dbcc-memorystatus-command-to-monitor-memory-usage-on-sq</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccMemoryStatus</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC, Memory Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccMemoryStatus -SqlInstance sqlcluster, sqlserver2012 </dev:code><dev:remarks><maml:para> Get output of DBCC MEMORYSTATUS for instances "sqlcluster" and "sqlserver2012". Returns results in a single recordset. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlcluster | Get-DbaDbccMemoryStatus </dev:code><dev:remarks><maml:para> Get output of DBCC MEMORYSTATUS for all servers in Server Central Management Server </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccMemoryStatus</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccProcCache</command:name><command:noun>DbaDbccProcCache</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC PROCCACHE</maml:para></maml:description></command:details><maml:description><maml:para>Returns the results of DBCC PROCCACHE</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-proccache-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccProcCache</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccProcCache -SqlInstance Server1 </dev:code><dev:remarks><maml:para> Get results of DBCC PROCCACHE for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbccProcCache </dev:code><dev:remarks><maml:para> Get results of DBCC PROCCACHE for Instances Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbccProcCache -SqlInstance Server1 -SqlCredential $cred Connects using sqladmin credential and gets results of DBCC PROCCACHE for Instance Server1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccProcCache</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccSessionBuffer</command:name><command:noun>DbaDbccSessionBuffer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets result of Database Console Command DBCC INPUTBUFFER or DBCC OUTPUTBUFFER</maml:para></maml:description></command:details><maml:description><maml:para>Returns the results of DBCC INPUTBUFFER or DBCC OUTPUTBUFFER for input sessions</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-inputbuffer-transact-sql</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-outputbuffer-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccSessionBuffer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operation</maml:name><maml:description><maml:para>DBCC Operation to execute - either InputBuffer or OutputBuffer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionId</maml:name><maml:description><maml:para>The Session ID(s) to use to get current input or output buffer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestId</maml:name><maml:description><maml:para>Is the exact request (batch) to search for within the current session The following query returns request_id: SELECT request_id FROM sys.dm_exec_requests WHERE session_id = @@spid;</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>If this switch is enabled, results for all User Sessions will be retreived This overides any values for SessionId or RequestId</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>If this switch is enabled, results for all User Sessions will be retreived This overides any values for SessionId or RequestId</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operation</maml:name><maml:description><maml:para>DBCC Operation to execute - either InputBuffer or OutputBuffer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestId</maml:name><maml:description><maml:para>Is the exact request (batch) to search for within the current session The following query returns request_id: SELECT request_id FROM sys.dm_exec_requests WHERE session_id = @@spid;</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionId</maml:name><maml:description><maml:para>The Session ID(s) to use to get current input or output buffer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccSessionBuffer -SqlInstance Server1 -Operation InputBuffer -SessionId 51 </dev:code><dev:remarks><maml:para> Get results of DBCC INPUTBUFFER(51) for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccSessionBuffer -SqlInstance Server1 -Operation OutputBuffer -SessionId 51, 52 </dev:code><dev:remarks><maml:para> Get results of DBCC OUTPUTBUFFER for SessionId's 51 and 52 for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccSessionBuffer -SqlInstance Server1 -Operation InputBuffer -SessionId 51 -RequestId 0 </dev:code><dev:remarks><maml:para> Get results of DBCC INPUTBUFFER(51,0) for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccSessionBuffer -SqlInstance Server1 -Operation OutputBuffer -SessionId 51 -RequestId 0 </dev:code><dev:remarks><maml:para> Get results of DBCC OUTPUTBUFFER(51,0) for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbccSessionBuffer -Operation InputBuffer -All </dev:code><dev:remarks><maml:para> Get results of DBCC INPUTBUFFER for all user sessions for the instances Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbccSessionBuffer -Operation OutputBuffer -All </dev:code><dev:remarks><maml:para> Get results of DBCC OUTPUTBUFFER for all user sessions for the instances Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbccSessionBuffer -SqlInstance Server1 -SqlCredential $cred -Operation InputBuffer -SessionId 51 -RequestId 0 Connects using sqladmin credential and gets results of DBCC INPUTBUFFER(51,0) for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbccSessionBuffer -SqlInstance Server1 -SqlCredential $cred -Operation OutputBuffer -SessionId 51 -RequestId 0 Connects using sqladmin credential and gets results of DBCC OUTPUTBUFFER(51,0) for Instance Server1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccSessionBuffer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccStatistic</command:name><command:noun>DbaDbccStatistic</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC SHOW_STATISTICS</maml:para></maml:description></command:details><maml:description><maml:para>Executes the command DBCC SHOW_STATISTICS against defined objects and returns results</maml:para><maml:para>Reclaims space from dropped variable-length columns in tables or indexed views</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-cleantable-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccStatistic</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table or indexed view for which to display statistics information. Any two part object name should be formatted as 'Schema.ObjectName'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Name of the index, statistics, or column for which to display statistics information. Target can be enclosed in brackets, single quotes, double quotes, or no quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Option</maml:name><maml:description><maml:para>Used to limit the result sets returned by the statement to the specified option. Options are 'StatHeader', 'DensityVector', 'Histogram', 'StatsStream' Default of StatHeader</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table or indexed view for which to display statistics information. Any two part object name should be formatted as 'Schema.ObjectName'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Option</maml:name><maml:description><maml:para>Used to limit the result sets returned by the statement to the specified option. Options are 'StatHeader', 'DensityVector', 'Histogram', 'StatsStream' Default of StatHeader</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Name of the index, statistics, or column for which to display statistics information. Target can be enclosed in brackets, single quotes, double quotes, or no quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC, Statistics Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccStatistic -SqlInstance SQLServer2017 </dev:code><dev:remarks><maml:para> Will run the statement SHOW_STATISTICS WITH STAT_HEADER against all Statistics on all User Tables or views for every accessible database on instance SQLServer2017. Connects using Windows Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccStatistic -SqlInstance SQLServer2017 -Database MyDb -Option DensityVector </dev:code><dev:remarks><maml:para> Will run the statement SHOW_STATISTICS WITH DENSITY_VECTOR against all Statistics on all User Tables or views for database MyDb on instance SQLServer2017. Connects using Windows Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbccStatistic -SqlInstance SQLServer2017 -SqlCredential $cred -Database MyDb -Object UserTable -Option Histogram Will run the statement SHOW_STATISTICS WITH HISTOGRAM against all Statistics on table UserTable for database MyDb on instance SQLServer2017. Connects using sqladmin credential. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbccStatistic -SqlInstance SQLServer2017 -Database MyDb -Object 'dbo.UserTable' -Target MyStatistic -Option StatsStream </dev:code><dev:remarks><maml:para> Runs the statement SHOW_STATISTICS('dbo.UserTable', 'MyStatistic') WITH STATS_STREAM against database MyDb on instances Sql1 and Sql2/sqlexpress. Connects using Windows Authentication. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccStatistic</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbccUserOption</command:name><command:noun>DbaDbccUserOption</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC USEROPTIONS</maml:para></maml:description></command:details><maml:description><maml:para>Returns the results of DBCC USEROPTIONS</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-useroptions-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbccUserOption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Option</maml:name><maml:description><maml:para>Return only specific options. Returns all results if not specified. Accepts any values in set 'ansi_null_dflt_on', 'ansi_nulls', 'ansi_padding', 'ansi_warnings', 'arithabort', 'concat_null_yields_null', 'datefirst', 'dateformat', 'isolation level', 'language', 'lock_timeout', 'quoted_identifier', 'textsize'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Option</maml:name><maml:description><maml:para>Return only specific options. Returns all results if not specified. Accepts any values in set 'ansi_null_dflt_on', 'ansi_nulls', 'ansi_padding', 'ansi_warnings', 'arithabort', 'concat_null_yields_null', 'datefirst', 'dateformat', 'isolation level', 'language', 'lock_timeout', 'quoted_identifier', 'textsize'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccUserOption -SqlInstance Server1 </dev:code><dev:remarks><maml:para> Get results of DBCC USEROPTIONS for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbccUserOption </dev:code><dev:remarks><maml:para> Get results of DBCC USEROPTIONS for Instances Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbccUserOption -SqlInstance Server1 -SqlCredential $cred Connects using sqladmin credential and gets results of DBCC USEROPTIONS for Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbccUserOption -SqlInstance Server1 -Option ansi_nulls, ansi_warnings, datefirst </dev:code><dev:remarks><maml:para> Gets results of DBCC USEROPTIONS for Instance Server1. Only display results for the options ansi_nulls, ansi_warnings, datefirst </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbccUserOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database certificates</maml:para></maml:description></command:details><maml:description><maml:para>Gets database certificates</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get certificate from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Get specific certificate by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Get specific certificate by subject</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Get specific certificate by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get certificate from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Get specific certificate by subject</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all certificates </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the certificate for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance Server1 -Database db1 -Certificate cert1 </dev:code><dev:remarks><maml:para> Gets the cert1 certificate within the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance Server1 -Database db1 -Subject 'Availability Group Cert' </dev:code><dev:remarks><maml:para> Gets the certificate within the db1 database that has the subject 'Availability Group Cert' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbCheckConstraint</command:name><command:noun>DbaDbCheckConstraint</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database Check constraints.</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Checks constraints.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbCheckConstraint</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Checks from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system objects from the table collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Checks from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system objects from the table collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database Author: Claudio Silva (@ClaudioESSilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCheckConstraint -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database check constraints. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCheckConstraint -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the check constraints for the db1 database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCheckConstraint -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the check constraints for all databases except db1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCheckConstraint -SqlInstance Server1 -ExcludeSystemTable </dev:code><dev:remarks><maml:para> Gets the check constraints for all databases that are not system objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbCheckConstraint </dev:code><dev:remarks><maml:para> Gets the check constraints for the databases on Sql1 and Sql2/sqlexpress. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbCheckConstraint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbCompatibility</command:name><command:noun>DbaDbCompatibility</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays the compatibility level for SQL Server databases.</maml:para></maml:description></command:details><maml:description><maml:para>Get the current database compatibility level for all databases on a server or list of databases passed in to the function.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbCompatibility</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Compatibility, Database Author: Garry Bargsley, blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompatibility -SqlInstance localhost\sql2017 </dev:code><dev:remarks><maml:para> Displays database compatibility level for all user databases on server localhost\sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompatibility -SqlInstance localhost\sql2017 -Database Test </dev:code><dev:remarks><maml:para> Displays database compatibility level for database Test on server localhost\sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbCompatibility</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbCompression</command:name><command:noun>DbaDbCompression</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets tables and indexes size and current compression settings.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbCompression</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Compression, Table, Database Author: Jess Pomfret (@jpomfret), jesspomfret.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompression -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns objects size and current compression level for all user databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompression -SqlInstance localhost -Database TestDatabase </dev:code><dev:remarks><maml:para> Returns objects size and current compression level for objects within the TestDatabase database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompression -SqlInstance localhost -ExcludeDatabase TestDatabases </dev:code><dev:remarks><maml:para> Returns objects size and current compression level for objects in all databases except the TestDatabase database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbCompression -SqlInstance localhost -ExcludeDatabase TestDatabases -Table table1, table2 </dev:code><dev:remarks><maml:para> Returns objects size and current compression level for table1 and table2 in all databases except the TestDatabase database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbCompression</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbDbccOpenTran</command:name><command:noun>DbaDbDbccOpenTran</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC OPENTRAN</maml:para></maml:description></command:details><maml:description><maml:para>Executes the command DBCC OPENTRAN against the requested databases</maml:para><maml:para>Displays information about the oldest active transaction and</maml:para><maml:para>the oldest distributed and nondistributed replicated transactions, if any,</maml:para><maml:para>within the transaction log of the specified database</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-opentran-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbDbccOpenTran</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed. The Name or Id of a database can be specified Database names must comply with the rules for identifiers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed. The Name or Id of a database can be specified Database names must comply with the rules for identifiers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbDbccOpenTran -SqlInstance SQLServer2017 </dev:code><dev:remarks><maml:para> Connects to instance SqlServer2017 using Windows Authentication and runs the command DBCC OPENTRAN WITH TABLERESULTS, NO_INFOMSGS against each database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbDbccOpenTran -SqlInstance SQLServer2017 -Database CurrentDB </dev:code><dev:remarks><maml:para> Connects to instance SqlServer2017 using Windows Authentication and runs the command DBCC OPENTRAN(CurrentDB) WITH TABLERESULTS, NO_INFOMSGS against the CurrentDB database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> 'Sql1','Sql2/sqlexpress' | Get-DbaDbDbccOpenTran -SqlCredential $cred Connects to instances Sql1 and Sql2/sqlexpress using sqladmin credential and runs the command DBCC OPENTRAN WITH TABLERESULTS, NO_INFOMSGS against each database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbDbccOpenTran</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbDetachedFileInfo</command:name><command:noun>DbaDbDetachedFileInfo</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get detailed information about detached SQL Server database files.</maml:para></maml:description></command:details><maml:description><maml:para>Gathers the following information from detached database files: database name, SQL Server version (compatibility level), collation, and file structure.</maml:para><maml:para>"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.</maml:para><maml:para>MDF 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbDetachedFileInfo</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server. This instance must be online and is required to parse the information contained with in the detached database file. This function will not attach the database file, it will only use SQL Server to read its contents.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the MDF file to be read. This path must be readable by the SQL Server service account. Ideally, the MDF will be located on the SQL Server itself, or on a network share to which the SQL Server service account has access.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the MDF file to be read. This path must be readable by the SQL Server service account. Ideally, the MDF will be located on the SQL Server itself, or on a network share to which the SQL Server service account has access.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server. This instance must be online and is required to parse the information contained with in the detached database file. This function will not attach the database file, it will only use SQL Server to read its contents.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Detach Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbDetachedFileInfo -SqlInstance sql2016 -Path M:\Archive\mydb.mdf </dev:code><dev:remarks><maml:para> Returns 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbDetachedFileInfo</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbEncryption</command:name><command:noun>DbaDbEncryption</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a summary of encryption used on databases passed to it.</maml:para></maml:description></command:details><maml:description><maml:para>Shows if a database has Transparent Data Encryption (TDE), any certificates, asymmetric keys or symmetric keys with details for each.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbEncryption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Switch parameter that when used will display system database information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Switch parameter that when used will display system database information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Encryption Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryption -SqlInstance DEV01 </dev:code><dev:remarks><maml:para> List all encryption found on the instance by database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryption -SqlInstance DEV01 -Database MyDB </dev:code><dev:remarks><maml:para> List all encryption found for the MyDB database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryption -SqlInstance DEV01 -ExcludeDatabase MyDB </dev:code><dev:remarks><maml:para> List all encryption found for all databases except MyDB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryption -SqlInstance DEV01 -IncludeSystemDBs </dev:code><dev:remarks><maml:para> List all encryption found for all databases including the system databases. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbEncryptionKey</command:name><command:noun>DbaDbEncryptionKey</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database encryption keys</maml:para></maml:description></command:details><maml:description><maml:para>Gets database encryption keys</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbEncryptionKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get encryption key from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving encryption keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get encryption key from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Database(s) to ignore when retrieving encryption keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryptionKey -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all encryption keys from sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryptionKey -SqlInstance sql01 -Database db1 </dev:code><dev:remarks><maml:para> Gets the encryption key for the db1 database on the sql01 instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryptionKey -SqlInstance sql01 -Database db1 -Certificate cert1 </dev:code><dev:remarks><maml:para> Gets the cert1 encryption key within the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbEncryptionKey -SqlInstance sql01 -Database db1 -Subject 'Availability Group Cert' </dev:code><dev:remarks><maml:para> Gets the encryption key within the db1 database that has the subject 'Availability Group Cert' on sql01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbEncryptionKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbExtentDiff</command:name><command:noun>DbaDbExtentDiff</command:noun><command:verb>Get</command:verb><maml:description><maml:para>What percentage of a database has changed since the last full backup</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>https://www.sqlskills.com/blogs/paul/new-script-how-much-of-the-database-has-changed-since-the-last-full-backup/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbExtentDiff</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, Database Author: Viorel Ciucu, cviorel.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbExtentDiff -SqlInstance SQL2016 -Database DBA </dev:code><dev:remarks><maml:para> Get the changes for the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbExtentDiff -SqlInstance SQL2017N1, SQL2017N2, SQL2016 -Database DB01 -SqlCredential $Cred Get the changes for the DB01 database on multiple servers. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbExtentDiff</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbFeatureUsage</command:name><command:noun>DbaDbFeatureUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Shows features that are enabled in the database but not supported on all editions of SQL Server. Basically checks for Enterprise feature usage.</maml:para></maml:description></command:details><maml:description><maml:para>Shows features that are enabled in the database but not supported on all editions of SQL Server.</maml:para><maml:para>Basically checks for Enterprise feature usage.</maml:para><maml:para>This feature must be removed before the database can be migrated to all available editions of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbFeatureUsage</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deprecated Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Get-DbaDbFeatureUsage </dev:code><dev:remarks><maml:para> Shows features that are enabled in the testdb and db2 databases but not supported on the all the editions of SQL Server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbFeatureUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbFile</command:name><command:noun>DbaDbFile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns detailed information about database files.</maml:para></maml:description></command:details><maml:description><maml:para>Returns detailed information about database files. Does not use SMO - SMO causes enumeration and this command avoids that.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbFile</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>Filter results to only files within this certain filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped collection of database objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>Filter results to only files within this certain filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped collection of database objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, File, Log Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFile -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Will return an object containing all file groups and their contained files for every database on the sql2016 SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFile -SqlInstance sql2016 -Database Impromptu </dev:code><dev:remarks><maml:para> Will return an object containing all file groups and their contained files for the Impromptu Database on the sql2016 SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFile -SqlInstance sql2016 -Database Impromptu, Trading </dev:code><dev:remarks><maml:para> Will return an object containing all file groups and their contained files for the Impromptu and Trading databases on the sql2016 SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database Impromptu, Trading | Get-DbaDbFile </dev:code><dev:remarks><maml:para> Will accept piped input from Get-DbaDatabase and return an object containing all file groups and their contained files for the Impromptu and Trading databases on the sql2016 SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFile -SqlInstance sql2016 -Database AdventureWorks2017 -FileGroup Index </dev:code><dev:remarks><maml:para> Return any files that are in the Index filegroup of the AdventureWorks2017 database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbFileGroup</command:name><command:noun>DbaDbFileGroup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a summary of information on filegroups</maml:para></maml:description></command:details><maml:description><maml:para>Shows information around filegroups.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbFileGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>Define a specific FileGroup you would like to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>Define a specific FileGroup you would like to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, File, Data Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGroup -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Return all FileGroups for all databases on instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGroup -SqlInstance sql2016 -Database MyDB </dev:code><dev:remarks><maml:para> Return all FileGroups for database MyDB on instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGroup -SqlInstance sql2016 -FileGroup Primary </dev:code><dev:remarks><maml:para> Returns information on filegroup called Primary if it exists in any database on the server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','localhost\namedinstance' | Get-DbaDbFileGroup </dev:code><dev:remarks><maml:para> Returns information on all FileGroups for all databases on instances 'localhost','localhost\namedinstance' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','localhost\namedinstance' | Get-DbaDbFileGroup </dev:code><dev:remarks><maml:para> Returns information on all FileGroups for all databases on instances 'localhost','localhost\namedinstance' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance SQL1\SQLExpress,SQL2 -ExcludeDatabase model,master | Get-DbaDbFileGroup </dev:code><dev:remarks><maml:para> Returns information on all FileGroups for all databases except model and master on instances SQL1\SQLExpress,SQL2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbFileGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbFileGrowth</command:name><command:noun>DbaDbFileGrowth</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database growth and growth type</maml:para></maml:description></command:details><maml:description><maml:para>Gets database growth and growth type</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbFileGrowth</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, File, Log Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGrowth -SqlInstance sql2017, sql2016, sql2012 </dev:code><dev:remarks><maml:para> Gets all database file growths on sql2017, sql2016, sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGrowth -SqlInstance sql2017, sql2016, sql2012 -Database pubs </dev:code><dev:remarks><maml:para> Gets the database file growth info for pubs on sql2017, sql2016, sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database test | Get-DbaDbFileGrowth </dev:code><dev:remarks><maml:para> Gets the test database file growth information on sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbFileGrowth</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbFileMapping</command:name><command:noun>DbaDbFileMapping</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Provides an easy way to build the FileMapping Hashtable for Restore-DbaDatabase from an existing database</maml:para></maml:description></command:details><maml:description><maml:para>Provides an easy way to build the FileMapping Hashtable for Restore-DbaDatabase from an existing database</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbFileMapping</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, File, Data, Log, Backup Author: Chrissy LeMaire (@cl), netnerds.net | Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $filemap = Get-DbaDbFileMapping -SqlInstance sql2016 -Database test </dev:code><dev:remarks><maml:para> PS C:\> Get-ChildItem \\nas\db\backups\test | Restore-DbaDatabase -SqlInstance sql2019 -Database test -FileMapping $filemap.FileMapping Restores test to sql2019 using the file structure built from the existing database on sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbFileMapping</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbForeignKey</command:name><command:noun>DbaDbForeignKey</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database Foreign Keys.</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Foreign Keys.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbForeignKey</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Foreign Keys from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system objects from the tables collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Foreign Keys from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system objects from the tables collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, ForeignKey, Table Author: Claudio Silva (@ClaudioESSilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbForeignKey -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database Foreign Keys. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbForeignKey -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the Foreign Keys for the db1 database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbForeignKey -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the Foreign Keys for all databases except db1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbForeignKey -SqlInstance Server1 -ExcludeSystemTable </dev:code><dev:remarks><maml:para> Gets the Foreign Keys from all tables that are not system objects from all databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbForeignKey </dev:code><dev:remarks><maml:para> Gets the Foreign Keys for the databases on Sql1 and Sql2/sqlexpress. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbForeignKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbIdentity</command:name><command:noun>DbaDbIdentity</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Checks the current identity value via DBCC CHECKIDENT with NORESEED optuin</maml:para></maml:description></command:details><maml:description><maml:para>Use the command DBCC CHECKIDENT with NORESEED option to checks the current identity value of a table and return results</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkident-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbIdentity</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) for which to check the current identity value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) for which to check the current identity value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbIdentity -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Table 'Production.ScrapReason' </dev:code><dev:remarks><maml:para> Connects to AdventureWorks2014 on instance SqlServer2017 using Windows Authentication and runs the command DBCC CHECKIDENT('Production.ScrapReason', NORESEED) to return the current identity value. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> 'Sql1','Sql2/sqlexpress' | Get-DbaDbIdentity -SqlCredential $cred -Database AdventureWorks2014 -Table 'Production.ScrapReason' Connects to AdventureWorks2014 on instances Sql1 and Sql2/sqlexpress using sqladmin credential and runs the command DBCC CHECKIDENT('Production.ScrapReason', NORESEED) to return the current identity value. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $query = "Select Quotename(Schema_Name(t.schema_id)) +'.' + QuoteName(t.name) as TableName from sys.columns c INNER JOIN sys.tables t on t.object_id = c.object_id WHERE is_identity = 1 and is_memory_optimized = 0" </dev:code><dev:remarks><maml:para> PS C:\> $IdentityTables = Invoke-DbaQuery -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Query $query -As SingleValue PS C:\> Get-DbaDbIdentity -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Table $IdentityTables Checks the current identity value for all non memory optimized tables with an Identity in the AdventureWorks2014 database on the SQLServer2017 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbIdentity</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbLogShipError</command:name><command:noun>DbaDbLogShipError</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaDbLogShipError returns all the log shipping errors that occurred</maml:para></maml:description></command:details><maml:description><maml:para>When your log shipping fails it's sometimes hard to see why is fails.</maml:para><maml:para>Using this function you'll be able to find out what went wrong in a short amount of time.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbLogShipError</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name. See examples for more info.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're not interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>Filter to get the log shipping action that has occurred like Backup, Copy, Restore. By default all the actions are returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DateTimeFrom</maml:name><maml:description><maml:para>Filter the results based on the date starting from datetime X</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DateTimeTo</maml:name><maml:description><maml:para>Filter the results based on the date ending with datetime X</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the primary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>Filter to get the log shipping action that has occurred like Backup, Copy, Restore. By default all the actions are returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name. See examples for more info.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DateTimeFrom</maml:name><maml:description><maml:para>Filter the results based on the date starting from datetime X</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DateTimeTo</maml:name><maml:description><maml:para>Filter the results based on the date ending with datetime X</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're not interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the primary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LogShipping Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogShipError -SqlInstance sql1 </dev:code><dev:remarks><maml:para> Get all the log shipping errors that occurred </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogShipError -SqlInstance sql1 -Action Backup </dev:code><dev:remarks><maml:para> Get the errors that have something to do with the backup of the databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogShipError -SqlInstance sql1 -Secondary </dev:code><dev:remarks><maml:para> Get the errors that occurred on the secondary instance. This will return the copy of the restore actions because those only occur on the secondary instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogShipError -SqlInstance sql1 -DateTimeFrom "01/05/2018" </dev:code><dev:remarks><maml:para> Get the errors that have occurred from "01/05/2018". This can also be of format "yyyy-MM-dd" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogShipError -SqlInstance sql1 -Secondary -DateTimeFrom "01/05/2018" -DateTimeTo "2018-01-07" </dev:code><dev:remarks><maml:para> Get the errors that have occurred between "01/05/2018" and "01/07/2018". See that is doesn't matter how the date is represented. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbLogShipError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbLogSpace</command:name><command:noun>DbaDbLogSpace</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information on the database transaction log usage for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Returns transaction log size and space used for each database on the SQL Server instance(s).</maml:para><maml:para>This can be used to monitor how much of your allocated transaction log space is in use, and whether it is nearing the point where it will need to grow.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbLogSpace</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabase</maml:name><maml:description><maml:para>Allows you to suppress output on system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabase</maml:name><maml:description><maml:para>Allows you to suppress output on system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Space, Log, File Author: Jess Pomfret, JessPomfret.com Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogSpace -SqlInstance Server1 </dev:code><dev:remarks><maml:para> Returns the transaction log usage information for all databases on Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogSpace -SqlInstance Server1 -Database Database1, Database2 </dev:code><dev:remarks><maml:para> Returns the transaction log usage information for both Database1 and Database 2 on Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogSpace -SqlInstance Server1 -ExcludeDatabase Database3 </dev:code><dev:remarks><maml:para> Returns the transaction log usage information for all databases on Server1, except Database3 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbLogSpace -SqlInstance Server1 -ExcludeSystemDatabase </dev:code><dev:remarks><maml:para> Returns the transaction log usage information for all databases on Server1, except the system databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegisteredServer -SqlInstance cmsServer | Get-DbaDbLogSpace -Database Database1 </dev:code><dev:remarks><maml:para> Returns the transaction log usage information for Database1 for a group of servers from SQL Server Central Management Server (CMS). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbLogSpace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMail</command:name><command:noun>DbaDbMail</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the database mail from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets the database mail from SQL Server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMail</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMail -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns the db mail server object on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMail -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the db mail server object on sql01\sharepoint then return a bunch more columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMail Returns the db mail server object for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMail</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailAccount</command:name><command:noun>DbaDbMailAccount</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database mail account(s) from SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail account(s) from SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailAccount</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Specifies one or more account(s) to get. If unspecified, all accounts will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAccount</maml:name><maml:description><maml:para>Specifies one or more account(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Specifies one or more account(s) to get. If unspecified, all accounts will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAccount</maml:name><maml:description><maml:para>Specifies one or more account(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailAccount -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns Database Mail accounts on sql01\sharepoint. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailAccount -SqlInstance sql01\sharepoint -Account 'The DBA Team' </dev:code><dev:remarks><maml:para> Returns 'The DBA Team' Database Mail account from sql01\sharepoint. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailAccount -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the Database Mail accounts on sql01\sharepoint then return a bunch more columns. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = sql2014, sql2016, sqlcluster\sharepoint </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMail | Get-DbaDbMailAccount Returns the Database Mail accounts for sql2014, sql2016 and sqlcluster\sharepoint. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailAccount</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailConfig</command:name><command:noun>DbaDbMailConfig</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database mail configs from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail configs from SQL Server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailConfig</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more config(s) to get. If unspecified, all configs will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more config(s) to get. If unspecified, all configs will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailConfig -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns DBMail configs on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailConfig -SqlInstance sql01\sharepoint -Name ProhibitedExtensions </dev:code><dev:remarks><maml:para> Returns the ProhibitedExtensions configuration on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailConfig -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the DBMail configs on sql01\sharepoint then return a bunch more columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMail | Get-DbaDbMailConfig Returns the DBMail configs for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailHistory</command:name><command:noun>DbaDbMailHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the history of mail sent from a SQL instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets the history of mail sent from a SQL instance</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailHistory</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to the send request date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Narrow the results by status. Valid values include Unsent, Sent, Failed and Retrying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to the send request date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Narrow the results by status. Valid values include Unsent, Sent, Failed and Retrying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailHistory -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns the entire DBMail history on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailHistory -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the entire DBMail history on sql01\sharepoint then return a bunch more columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMailHistory Returns the all DBMail history for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailLog</command:name><command:noun>DbaDbMailLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the DBMail log from a SQL instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets the DBMail log from a SQL instance</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailLog</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to the send request date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Narrow the results by type. Valid values include Error, Warning, Success, Information, Internal</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to the send request date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Narrow the results by type. Valid values include Error, Warning, Success, Information, Internal</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailLog -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns the entire DBMail log on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailLog -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the entire DBMail log on sql01\sharepoint, includes all returned information. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMailLog -Type Error, Information Returns only the Error and Information DBMail log for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailProfile</command:name><command:noun>DbaDbMailProfile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database mail profile(s) from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail profile(s) from SQL Server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailProfile</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>Specifies one or more profile(s) to get. If unspecified, all profiles will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProfile</maml:name><maml:description><maml:para>Specifies one or more profile(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProfile</maml:name><maml:description><maml:para>Specifies one or more profile(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>Specifies one or more profile(s) to get. If unspecified, all profiles will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailProfile -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns DBMail profiles on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailProfile -SqlInstance sql01\sharepoint -Profile 'The DBA Team' </dev:code><dev:remarks><maml:para> Returns The DBA Team DBMail profile from sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailProfile -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the DBMail profiles on sql01\sharepoint then return a bunch more columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014", "sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMail | Get-DbaDbMailProfile Returns the DBMail profiles for "sql2014", "sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014", "sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbMailProfile -SqlInstance $servers Returns the DBMail profiles for "sql2014", "sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailProfile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMailServer</command:name><command:noun>DbaDbMailServer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database mail servers from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail servers from SQL Server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMailServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Server</maml:name><maml:description><maml:para>Specifies one or more server(s) to get. If unspecified, all servers will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Get only the mail server associated with specific accounts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Get only the mail server associated with specific accounts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts pipeline input from Get-DbaDbMail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Server</maml:name><maml:description><maml:para>Specifies one or more server(s) to get. If unspecified, all servers will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mail, DbMail, Email Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailServer -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns all DBMail servers on sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailServer -SqlInstance sql01\sharepoint -Server DbaTeam </dev:code><dev:remarks><maml:para> Returns The DBA Team DBMail server from sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailServer -SqlInstance sql01\sharepoint | Select-Object * </dev:code><dev:remarks><maml:para> Returns the DBMail servers on sql01\sharepoint then return a bunch more columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbMail | Get-DbaDbMailServer Returns the DBMail servers for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMailServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMasterKey</command:name><command:noun>DbaDbMasterKey</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets specified database master key</maml:para></maml:description></command:details><maml:description><maml:para>Gets specified database master key</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMasterKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get master key from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get master key from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMasterKey -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all master database keys </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMasterKey -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the master key for the db1 database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMemoryUsage</command:name><command:noun>DbaDbMemoryUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Determine buffer pool usage by database.</maml:para></maml:description></command:details><maml:description><maml:para>This command can be utilized to determine which databases on a given instance are consuming buffer pool memory.</maml:para><maml:para>This command is based on query provided by Aaron Bertrand.</maml:para><maml:para>Reference: https://www.mssqltips.com/sqlservertip/2393/determine-sql-server-memory-use-by-database-and-object/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMemoryUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDb</maml:name><maml:description><maml:para>Switch to have the output include system database memory consumption.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDb</maml:name><maml:description><maml:para>Switch to have the output include system database memory consumption.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Memory, Database Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMemoryUsage -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns the buffer pool consumption for all user databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMemoryUsage -SqlInstance sqlserver2014a -IncludeSystemDb </dev:code><dev:remarks><maml:para> Returns the buffer pool consumption for all user databases and system databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMemoryUsage -SqlInstance sql1 -IncludeSystemDb -Database tempdb </dev:code><dev:remarks><maml:para> Returns the buffer pool consumption for tempdb database only </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMemoryUsage -SqlInstance sql2 -IncludeSystemDb -Exclude 'master','model','msdb','ResourceDb' </dev:code><dev:remarks><maml:para> Returns the buffer pool consumption for all user databases and tempdb database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMemoryUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMirror</command:name><command:noun>DbaDbMirror</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets properties of database mirrors and mirror witnesses.</maml:para></maml:description></command:details><maml:description><maml:para>Gets properties of database mirrors and mirror witnesses.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMirror</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMirror -SqlInstance localhost </dev:code><dev:remarks><maml:para> Gets properties of database mirrors and mirror witnesses on localhost </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMirror -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Gets properties of database mirrors and mirror witnesses on localhost and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMirror -SqlInstance localhost, sql2016 -Database mymirror </dev:code><dev:remarks><maml:para> Gets properties of database mirrors and mirror witnesses on localhost and sql2016 SQL Server instances for databases named mymirror </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMirror</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbMirrorMonitor</command:name><command:noun>DbaDbMirrorMonitor</command:noun><command:verb>Get</command:verb><maml:description><maml:para>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.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Basically executes sp_dbmmonitorresults.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbMirrorMonitor</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Updates the status for the database by calling sp_dbmmonitorupdate before computing the results. However, if the status table has been updated within the previous 15 seconds, or the user is not a member of the sysadmin fixed server role, the command runs without updating the status.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LimitResults</maml:name><maml:description><maml:para>Limit results. Defaults to last two hours. Options include: LastRow LastTwoHours LastFourHours LastEightHours LastDay LastTwoDays Last100Rows Last500Rows Last1000Rows Last1000000Rows</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LimitResults</maml:name><maml:description><maml:para>Limit results. Defaults to last two hours. Options include: LastRow LastTwoHours LastFourHours LastEightHours LastDay LastTwoDays Last100Rows Last500Rows Last1000Rows Last1000000Rows</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Updates the status for the database by calling sp_dbmmonitorupdate before computing the results. However, if the status table has been updated within the previous 15 seconds, or the user is not a member of the sysadmin fixed server role, the command runs without updating the status.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012 </dev:code><dev:remarks><maml:para> Returns last two hours' worth of status rows for a monitored database from the status table on sql2008 and sql2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMirrorMonitor -SqlInstance sql2005 -LimitResults LastDay -Update </dev:code><dev:remarks><maml:para> Updates monitor stats then returns the last 24 hours worth of status rows for a monitored database from the status table on sql2008 and sql2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbMirrorMonitor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbObjectTrigger</command:name><command:noun>DbaDbObjectTrigger</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get all existing triggers on object level (table or view) on one or more SQL instances.</maml:para></maml:description></command:details><maml:description><maml:para>Get all existing triggers on object level (table or view) on one or more SQL instances.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbObjectTrigger</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Allows specify the object type associated with the trigger. Available options All, Table and View. By default is All.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow pipedline input from Get-DbaDbTable and/or Get-DbaDbView</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/ca</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/ca</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow pipedline input from Get-DbaDbTable and/or Get-DbaDbView</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Allows specify the object type associated with the trigger. Available options All, Table and View. By default is All.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Trigger Author: Claudio Silva (@claudioessilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbObjectTrigger -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns all database triggers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database supa | Get-DbaDbObjectTrigger </dev:code><dev:remarks><maml:para> Returns all triggers for database supa on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbObjectTrigger -SqlInstance sql2017 -Database supa </dev:code><dev:remarks><maml:para> Returns all triggers for database supa on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbObjectTrigger</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbOrphanUser</command:name><command:noun>DbaDbOrphanUser</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get orphaned users.</maml:para></maml:description></command:details><maml:description><maml:para>An orphan user is defined by a user that does not have their matching login. (Login property = "").</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbOrphanUser</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Orphan, Database, User, Login Author: Claudio Silva (@ClaudioESSilva) | Garry Bargsley (@gbargsley) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbOrphanUser -SqlInstance localhost\sql2016 </dev:code><dev:remarks><maml:para> Finds all orphan users without matching Logins in all databases present on server 'localhost\sql2016'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbOrphanUser -SqlInstance localhost\sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Finds all orphan users without matching Logins in all databases present on server 'localhost\sql2016'. SQL Server authentication will be used in connecting to the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbOrphanUser -SqlInstance localhost\sql2016 -Database db1 </dev:code><dev:remarks><maml:para> Finds orphan users without matching Logins in the db1 database present on server 'localhost\sql2016'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbOrphanUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbPageInfo</command:name><command:noun>DbaDbPageInfo</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaDbPageInfo will return page information for a database</maml:para></maml:description></command:details><maml:description><maml:para>Get-DbaDbPageInfo is able to return information about the pages in a database.</maml:para><maml:para>It's possible to return the information for multiple databases and filter on specific databases, schemas and tables.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbPageInfo</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Filter to only get specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Filter to only get specific schemas</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Filter to only get specific tables</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Filter to only get specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Filter to only get specific schemas</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Filter to only get specific tables</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Page Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPageInfo -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns page information for all databases on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPageInfo -SqlInstance sql2017, sql2016 -Database testdb </dev:code><dev:remarks><maml:para> Returns page information for the testdb on sql2017 and sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaDatabase -Database testdb | Get-DbaDbPageInfo </dev:code><dev:remarks><maml:para> Returns page information for the testdb on all $servers </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbPageInfo</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbPartitionFunction</command:name><command:noun>DbaDbPartitionFunction</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database Partition Functions.</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Partition Functions.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbPartitionFunction</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionFunction</maml:name><maml:description><maml:para>The name(s) of the partition function(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionFunction</maml:name><maml:description><maml:para>The name(s) of the partition function(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Partition Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionFunction -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database partition functions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionFunction -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the partition functions for the db1 database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionFunction -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the partition functions for all databases except db1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbPartitionFunction </dev:code><dev:remarks><maml:para> Gets the partition functions for the databases on Sql1 and Sql2/sqlexpress. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionFunction -SqlInstance localhost -Database TestDB -PartitionFunction partFun01 </dev:code><dev:remarks><maml:para> Gets the partition function partFun01 for the TestDB on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbPartitionFunction</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbPartitionScheme</command:name><command:noun>DbaDbPartitionScheme</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database partition scheme(s).</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Partition Schemes.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbPartitionScheme</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionScheme</maml:name><maml:description><maml:para>The name(s) of the partition scheme(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionScheme</maml:name><maml:description><maml:para>The name(s) of the partition scheme(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Partition Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionScheme -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database partition schemes. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionScheme -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the partition schemes for the db1 database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionScheme -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the partition schemes for all databases except db1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbPartitionScheme </dev:code><dev:remarks><maml:para> Gets the partition schemes for the databases on Sql1 and Sql2/sqlexpress. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionScheme -SqlInstance localhost -Database TestDB -PartitionScheme partSch01 </dev:code><dev:remarks><maml:para> Gets the partition scheme partSch01 for the TestDB on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbPartitionScheme</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbQueryStoreOption</command:name><command:noun>DbaDbQueryStoreOption</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get the Query Store configuration for Query Store enabled databases.</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves and returns the Query Store configuration for every database that has the Query Store feature enabled.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbQueryStoreOption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.QueryStoreOptions</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: QueryStore Author: Enrico van de Laar (@evdlaar) | Klaas Vandenberghe (@PowerDBAKlaas) | Tracy Boggiano (@TracyBoggiano) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbQueryStoreOption -SqlInstance ServerA\sql </dev:code><dev:remarks><maml:para> Returns Query Store configuration settings for every database on the ServerA\sql instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbQueryStoreOption -SqlInstance ServerA\sql | Where-Object {$_.ActualState -eq "ReadWrite"} </dev:code><dev:remarks><maml:para> Returns the Query Store configuration for all databases on ServerA\sql where the Query Store feature is in Read/Write mode. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbQueryStoreOption -SqlInstance localhost | format-table -AutoSize -Wrap </dev:code><dev:remarks><maml:para> Returns Query Store configuration settings for every database on the ServerA\sql instance inside a table format. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbQueryStoreOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbRecoveryModel</command:name><command:noun>DbaDbRecoveryModel</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays the Recovery Model.</maml:para></maml:description></command:details><maml:description><maml:para>Displays the Recovery Model for all databases. This is the default, you can filter using -Database, -ExcludeDatabase, -RecoveryModel</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbRecoveryModel</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Filters the output based on Recovery Model. Valid options are Simple, Full and BulkLogged Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Filters the output based on Recovery Model. Valid options are Simple, Full and BulkLogged Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Recovery, RecoveryModel, Backup Author: Viorel Ciucu (@viorelciucu), cviorel.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Verbose </dev:code><dev:remarks><maml:para> Gets all databases on SQL Server instance sql2014 having RecoveryModel set to BulkLogged. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRecoveryModel -SqlInstance sql2014 -Database TestDB </dev:code><dev:remarks><maml:para> Gets recovery model information for TestDB. If TestDB does not exist on the instance nothing is returned. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbRecoveryModel</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbRestoreHistory</command:name><command:noun>DbaDbRestoreHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns restore history details for databases on a SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>By default, this command will return the server name, database, username, restore type, date, from file and to files.</maml:para><maml:para>Thanks 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbRestoreHistory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Specifies the SQL Server instance(s) to operate on. Requires SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a datetime to use as the starting point for searching backup history.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Deprecated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the last restore action performed on each database is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreType</maml:name><maml:description><maml:para>Return the history for a specific type of restore. The possible values are 'Database', 'File', 'Filegroup', 'Differential', 'Log', 'Verifyonly', 'Revert'. This is an optional parameter so there is no default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Deprecated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, the last restore action performed on each database is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreType</maml:name><maml:description><maml:para>Return the history for a specific type of restore. The possible values are 'Database', 'File', 'Filegroup', 'Differential', 'Log', 'Verifyonly', 'Revert'. This is an optional parameter so there is no default value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Specifies a datetime to use as the starting point for searching backup history.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Specifies the SQL Server instance(s) to operate on. Requires SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRestoreHistory -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns server name, database, username, restore type, date for all restored databases on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRestoreHistory -SqlInstance sql2016 -Database db1, db2 -Since '2016-07-01 10:47:00' </dev:code><dev:remarks><maml:para> Returns restore information only for databases db1 and db2 on sql2016 since July 1, 2016 at 10:47 AM. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRestoreHistory -SqlInstance sql2014, sql2016 -Exclude db1 </dev:code><dev:remarks><maml:para> Returns restore information for all databases except db1 on sql2014 and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaDbRestoreHistory -SqlInstance sql2014 -Database AdventureWorks2014, pubs -SqlCredential $cred | Format-Table Returns database restore information for AdventureWorks2014 and pubs database on sql2014, connects using SQL Authentication via sqladmin account. Formats the data as a table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2016 | Get-DbaDbRestoreHistory </dev:code><dev:remarks><maml:para> Returns database restore information for every database on every server listed in the Central Management Server on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRestoreHistory -SqlInstance sql2016 -RestoreType Log </dev:code><dev:remarks><maml:para> Returns log restore information for every database on the sql2016 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbRestoreHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbRole</command:name><command:noun>DbaDbRole</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get the database roles for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaDbRole returns connected SMO object for database roles for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbRole</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, User Author: Ben Miller (@DBAduck) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all database roles in all databases on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all roles of all database(s) on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbRole Returns roles of all database(s) for every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance localhost -Database msdb </dev:code><dev:remarks><maml:para> Returns roles of the database msdb on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance localhost -Database msdb -ExcludeFixedRole </dev:code><dev:remarks><maml:para> Returns all non-fixed roles in the msdb database on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRole -SqlInstance localhost -Database msdb -Role 'db_owner' </dev:code><dev:remarks><maml:para> Returns the db_owner role in the msdb database on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbRoleMember</command:name><command:noun>DbaDbRoleMember</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get members of database roles for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaDbRoleMember returns connected SMO object for database roles for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbRoleMember</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all members of fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemUser</maml:name><maml:description><maml:para>Includes system users. By default system users are not included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Excludes all members of fixed roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemUser</maml:name><maml:description><maml:para>Includes system users. By default system users are not included.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, User Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRoleMember -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all members of all database roles on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRoleMember -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all members of all database roles on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbRoleMember Returns all members of all database roles for every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRoleMember -SqlInstance localhost -Database msdb </dev:code><dev:remarks><maml:para> Returns non-system members of all roles in the msdb database on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRoleMember -SqlInstance localhost -Database msdb -IncludeSystemUser -ExcludeFixedRole </dev:code><dev:remarks><maml:para> Returns all members of non-fixed roles in the msdb database on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbRoleMember -SqlInstance localhost -Database msdb -Role 'db_owner' </dev:code><dev:remarks><maml:para> Returns all members of the db_owner role in the msdb database on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost -Database msdb -Role 'db_owner' </dev:code><dev:remarks><maml:para> PS C:\> $roles | Get-DbaDbRoleMember Returns all members of the db_owner role in the msdb database on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSchema</command:name><command:noun>DbaDbSchema</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Finds the database schema SMO object(s) based on the given filter params.</maml:para></maml:description></command:details><maml:description><maml:para>Finds the database schema SMO object(s) based on the given filter params.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSchema</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name(s) of the database user(s) that own(s) the schema(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>Include the system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemSchemas</maml:name><maml:description><maml:para>Include the system schemas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDatabases</maml:name><maml:description><maml:para>Include the system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemSchemas</maml:name><maml:description><maml:para>Include the system schemas.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name(s) of the database user(s) that own(s) the schema(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Schema Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost </dev:code><dev:remarks><maml:para> Gets all non-system database schemas from all user databases on the localhost instance. Note: the dbo schema is a system schema and won't be included in the output from this example. To include the dbo schema specify -IncludeSystemSchemas </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost -Schema dbo -IncludeSystemSchemas </dev:code><dev:remarks><maml:para> Returns the dbo schema from the databases on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost -IncludeSystemDatabases -IncludeSystemSchemas </dev:code><dev:remarks><maml:para> Gets all database schemas from all databases on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost -Schema TestSchema </dev:code><dev:remarks><maml:para> Finds and returns the TestSchema schema from the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost -SchemaOwner DBUser1 </dev:code><dev:remarks><maml:para> Finds and returns the schemas owned by DBUser1 from the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSchema -SqlInstance localhost -Database TestDB -SchemaOwner DBUser1 </dev:code><dev:remarks><maml:para> Finds and returns the schemas owned by DBUser1 in the TestDB database from the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $schema = Get-DbaDbSchema -SqlInstance localhost -Database TestDB -Schema TestSchema </dev:code><dev:remarks><maml:para> PS C:\> $schema.Owner = DBUser2 PS C:\> $schema.Alter() Finds the TestSchema in the TestDB on the localhost instance and then changes the schema owner to DBUser2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $schema = Get-DbaDbSchema -SqlInstance localhost -Database TestDB -Schema TestSchema </dev:code><dev:remarks><maml:para> PS C:\> $schema.Drop() Finds the TestSchema in the TestDB on the localhost instance and then drops it. Note: to drop a schema all objects must be transferred to another schema or dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $db = Get-DbaDatabase -SqlInstance localhost -Database TestDB </dev:code><dev:remarks><maml:para> PS C:\> $schema = $db | Get-DbaDbSchema -Schema TestSchema Finds the TestSchema in the TestDB which is passed via pipeline into the Get-DbaDbSchema command. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSchema</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSequence</command:name><command:noun>DbaDbSequence</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Finds a sequence.</maml:para></maml:description></command:details><maml:description><maml:para>Finds a sequence in the database(s) specified.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSequence</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Data, Sequence, Table Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence </dev:code><dev:remarks><maml:para> Finds the sequence TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01 -Database TestDB | Get-DbaDbSequence -Sequence TestSequence -Schema TestSchema </dev:code><dev:remarks><maml:para> Using a pipeline this command finds the sequence named TestSchema.TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance localhost </dev:code><dev:remarks><maml:para> Finds all the sequences on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance localhost -Database db </dev:code><dev:remarks><maml:para> Finds all the sequences in the db database on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance localhost -Sequence seq </dev:code><dev:remarks><maml:para> Finds all the sequences named seq on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance localhost -Schema sch </dev:code><dev:remarks><maml:para> Finds all the sequences in the sch schema on the localhost instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSequence</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbServiceBrokerQueue</command:name><command:noun>DbaDbServiceBrokerQueue</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database service broker queues</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Sservice broker queue</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbServiceBrokerQueue</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get service broker queues from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemQueue</maml:name><maml:description><maml:para>This switch removes all system objects from the queue collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get service broker queues from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemQueue</maml:name><maml:description><maml:para>This switch removes all system objects from the queue collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, ServiceBroker, Queue Author: Ant Green (@ant_green) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerQueue -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database service broker queues </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerQueue -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the service broker queues for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerQueue -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the service broker queues for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerQueue -SqlInstance Server1 -ExcludeSystemQueue </dev:code><dev:remarks><maml:para> Gets the service broker queues for all databases that are not system objects </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbServiceBrokerQueue</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbServiceBrokerService</command:name><command:noun>DbaDbServiceBrokerService</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database service broker services</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Service broker services</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbServiceBrokerService</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get service broker services from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemService</maml:name><maml:description><maml:para>This switch removes all system objects from the queue collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get service broker services from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemService</maml:name><maml:description><maml:para>This switch removes all system objects from the queue collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, ServiceBroker Author: Ant Green (@ant_green) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerService -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database service broker queues </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerService -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the service broker queues for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerService -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the service broker queues for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbServiceBrokerService -SqlInstance Server1 -ExcludeSystemService </dev:code><dev:remarks><maml:para> Gets the service broker queues for all databases that are not system objects </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbServiceBrokerService</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSharePoint</command:name><command:noun>DbaDbSharePoint</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns databases that are part of a SharePoint Farm.</maml:para></maml:description></command:details><maml:description><maml:para>Returns databases that are part of a SharePoint Farm, as found in the SharePoint Configuration database.</maml:para><maml:para>By default, this command checks SharePoint_Config. To use an alternate database, use the ConfigDatabase parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSharePoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigDatabase</maml:name><maml:description><maml:para>The name of the SharePoint Configuration database. Defaults to SharePoint_Config.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigDatabase</maml:name><maml:description><maml:para>The name of the SharePoint Configuration database. Defaults to SharePoint_Config.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SharePoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSharePoint -SqlInstance sqlcluster </dev:code><dev:remarks><maml:para> Returns databases that are part of a SharePoint Farm, as found in SharePoint_Config on sqlcluster </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlcluster -Database SharePoint_Config_2016 | Get-DbaDbSharePoint </dev:code><dev:remarks><maml:para> Returns databases that are part of a SharePoint Farm, as found in SharePoint_Config_2016 on sqlcluster </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSharePoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSnapshot</command:name><command:noun>DbaDbSnapshot</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get database snapshots with details</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves the list of database snapshot available, along with their base (the db they are the snapshot of) and creation time</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSnapshot</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return information for only specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Return information for only specific snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSnapshot</maml:name><maml:description><maml:para>The snapshot(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return information for only specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSnapshot</maml:name><maml:description><maml:para>The snapshot(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Return information for only specific snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Snapshot Author: Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns a custom object displaying Server, Database, DatabaseCreated, SnapshotOf, SizeMB, DatabaseCreated </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting </dev:code><dev:remarks><maml:para> Returns information for database snapshots having HR and Accounting as base dbs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sqlserver2014a -Snapshot HR_snapshot, Accounting_snapshot </dev:code><dev:remarks><maml:para> Returns information for database snapshots HR_snapshot and Accounting_snapshot </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSnapshot</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSpace</command:name><command:noun>DbaDbSpace</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns database file space information for database files on a SQL instance.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>File free space script borrowed and modified from Glenn Berry's DMV scripts (http://www.sqlskills.com/blogs/glenn/category/dmv-queries/)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSpace</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Deprecated - if filtering is needed, please pipe filtered results from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped collection of database objects from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Deprecated - if filtering is needed, please pipe filtered results from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped collection of database objects from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Space Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSpace -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all user database files and free space information for the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSpace -SqlInstance localhost | Where-Object {$_.PercentUsed -gt 80} </dev:code><dev:remarks><maml:para> Returns 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%. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','localhost\namedinstance' | Get-DbaDbSpace </dev:code><dev:remarks><maml:para> Returns all user database files and free space information for the localhost and localhost\namedinstance SQL Server instances. Processes data via the pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSpace -SqlInstance localhost -Database db1, db2 | Where-Object { $_.SpaceUntilMaxSize.Megabyte -lt 1 } </dev:code><dev:remarks><maml:para> Returns database files and free space information for the db1 and db2 on localhost where there is only 1MB left until the space is maxed out </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSpace -SqlInstance localhost -Database db1, db2 | Where-Object { $_.SpaceUntilMaxSize.Gigabyte -lt 1 } </dev:code><dev:remarks><maml:para> Returns database files and free space information for the db1 and db2 on localhost where there is only 1GB left until the space is maxed out </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSpace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbState</command:name><command:noun>DbaDbState</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets various options for databases, hereby called "states"</maml:para></maml:description></command:details><maml:description><maml:para>Gets some common "states" on databases:</maml:para><maml:para>- "RW" options : READ_ONLY or READ_WRITE</maml:para><maml:para>- "Status" options : ONLINE, OFFLINE, EMERGENCY, RESTORING</maml:para><maml:para>- "Access" options : SINGLE_USER, RESTRICTED_USER, MULTI_USER</maml:para><maml:para>Returns an object with SqlInstance, Database, RW, Status, Access</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbState</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbState -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Gets options for all databases of the sqlserver2014a instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbState -SqlInstance sqlserver2014a -Database HR, Accounting </dev:code><dev:remarks><maml:para> Gets options for both HR and Accounting database of the sqlserver2014a instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbState -SqlInstance sqlserver2014a -Exclude HR </dev:code><dev:remarks><maml:para> Gets options for all databases of the sqlserver2014a instance except HR </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sqlserver2014a', 'sqlserver2014b' | Get-DbaDbState </dev:code><dev:remarks><maml:para> Gets options for all databases of sqlserver2014a and sqlserver2014b instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbState</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbStoredProcedure</command:name><command:noun>DbaDbStoredProcedure</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database Stored Procedures</maml:para></maml:description></command:details><maml:description><maml:para>Gets database Stored Procedures</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbStoredProcedure</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Stored Procedures from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemSp</maml:name><maml:description><maml:para>This switch removes all system objects from the Stored Procedure collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name(s) of the stored procedure(s) to return. It is possible to specify two-part names such as schemaname.procname and three-part names such as dbname.schemaname.procname.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return procedures from the specified schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Stored Procedures from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemSp</maml:name><maml:description><maml:para>This switch removes all system objects from the Stored Procedure collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name(s) of the stored procedure(s) to return. It is possible to specify two-part names such as schemaname.procname and three-part names such as dbname.schemaname.procname.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return procedures from the specified schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, StoredProcedure, Proc Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database Stored Procedures </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedures for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedures for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -ExcludeSystemSp </dev:code><dev:remarks><maml:para> Gets the Stored Procedures for all databases that are not system objects </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbStoredProcedure </dev:code><dev:remarks><maml:para> Gets the Stored Procedures for the databases on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance Server1 -ExcludeSystem | Get-DbaDbStoredProcedure </dev:code><dev:remarks><maml:para> Pipe the databases from Get-DbaDatabase into Get-DbaDbStoredProcedure </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -Database db1 -Name schema1.proc1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedure proc1 in the schema1 schema in the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -Name db1.schema1.proc1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedure proc1 in the schema1 schema in the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -Database db1 -Name proc1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedure proc1 in the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance Server1 -Database db1 -Schema schema1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedures in schema1 for the db1 database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbStoredProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbSynonym</command:name><command:noun>DbaDbSynonym</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get the synonym(s) for database(s) / instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaDbSynonym returns the synonym(s) for database(s) / instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbSynonym</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym(s) to process. If unspecified, all synonyms will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSynonym</maml:name><maml:description><maml:para>The synonym(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSynonym</maml:name><maml:description><maml:para>The synonym(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym(s) to process. If unspecified, all synonyms will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Synonym Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSynonym -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all database synonyms in all databases on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSynonym -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all synonyms of all database(s) on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDbSynonym Returns synonyms of all database(s) for every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSynonym -SqlInstance localhost -Database db1 </dev:code><dev:remarks><maml:para> Returns synonyms of the database db1 on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSynonym -SqlInstance localhost -Database db1 -Synonym 'synonym1' </dev:code><dev:remarks><maml:para> Returns the synonym1 synonym in the db1 database on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbSynonym</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbTable</command:name><command:noun>DbaDbTable</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a summary of information on the tables</maml:para></maml:description></command:details><maml:description><maml:para>Shows table information around table row and data sizes and if it has any table type information.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbTable</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Switch parameter that when used will display system database information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>Switch parameter that when used will display system database information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Only return tables from the specified schema</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to query. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Tables Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Database Test1 </dev:code><dev:remarks><maml:para> Return all tables in the Test1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Database MyDB -Table MyTable </dev:code><dev:remarks><maml:para> Return only information on the table MyTable from the database MyDB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Database MyDB -Table MyTable -Schema MySchema </dev:code><dev:remarks><maml:para> Return only information on the table MyTable from the database MyDB and only from the schema MySchema </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Table MyTable </dev:code><dev:remarks><maml:para> Returns information on table called MyTable if it exists in any database on the server, under any schema </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Table dbo.[First.Table] </dev:code><dev:remarks><maml:para> Returns information on table called First.Table on schema dbo if it exists in any database on the server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','localhost\namedinstance' | Get-DbaDbTable -Database DBA -Table Commandlog </dev:code><dev:remarks><maml:para> Returns information on the CommandLog table in the DBA database on both instances localhost and the named instance localhost\namedinstance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance DEV01 -Table "[[DbName]]].[Schema.With.Dots].[`"[Process]]`"]" -Verbose </dev:code><dev:remarks><maml:para> For the instance Dev01 Returns information for a table named: "[Process]" in schema named: Schema.With.Dots in database named: [DbName] The Table name, Schema name and Database name must be wrapped in square brackets [ ] Special charcters like " must be escaped by a ` charcter. In addition any actual instance of the ] character must be escaped by being duplicated. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbTrigger</command:name><command:noun>DbaDbTrigger</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get all existing database triggers on one or more SQL instances.</maml:para></maml:description></command:details><maml:description><maml:para>Get all existing database triggers on one or more SQL instances.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbTrigger</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow pipedline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/ca</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/ca</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allow pipedline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Trigger Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTrigger -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns all database triggers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database supa | Get-DbaDbTrigger </dev:code><dev:remarks><maml:para> Returns all triggers for database supa on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTrigger -SqlInstance sql2017 -Database supa </dev:code><dev:remarks><maml:para> Returns all triggers for database supa on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbTrigger</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbUdf</command:name><command:noun>DbaDbUdf</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database User Defined Functions</maml:para></maml:description></command:details><maml:description><maml:para>Gets database User Defined Functions</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbUdf</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get User Defined Functions from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUdf</maml:name><maml:description><maml:para>This switch removes all system objects from the UDF collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name(s) of the user defined functions to process. If unspecified, all user defined functions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>The name(s) of the user defined functions to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get User Defined Functions from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>The name(s) of the user defined functions to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUdf</maml:name><maml:description><maml:para>This switch removes all system objects from the UDF collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name(s) of the user defined functions to process. If unspecified, all user defined functions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Udf, Database Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUdf -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database User Defined Functions </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUdf -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the User Defined Functions for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUdf -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the User Defined Functions for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUdf -SqlInstance Server1 -ExcludeSystemUdf </dev:code><dev:remarks><maml:para> Gets the User Defined Functions for all databases that are not system objects (there can be 100+ system User Defined Functions in each DB) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbUdf </dev:code><dev:remarks><maml:para> Gets the User Defined Functions for the databases on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbUdf</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbUser</command:name><command:noun>DbaDbUser</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database users</maml:para></maml:description></command:details><maml:description><maml:para>Gets database users</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbUser</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUser</maml:name><maml:description><maml:para>This switch removes all system objects from the user collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the name(s) of the user(s) to return.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the name(s) of the login(s) to filter the user(s) returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get users from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUser</maml:name><maml:description><maml:para>This switch removes all system objects from the user collection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the name(s) of the login(s) to filter the user(s) returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the name(s) of the user(s) to return.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: User, Database Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database users </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the users for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the users for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance Server1 -ExcludeSystemUser </dev:code><dev:remarks><maml:para> Gets the users for all databases that are not system objects, like 'dbo', 'guest' or 'INFORMATION_SCHEMA' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbUser </dev:code><dev:remarks><maml:para> Gets the users for the databases on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance Server1 -Database db1 -User user1, user2 </dev:code><dev:remarks><maml:para> Gets the users 'user1' and 'user2' from the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance Server1 -Login login1, login2 </dev:code><dev:remarks><maml:para> Gets the users associated with the logins 'login1' and 'login2' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbUserDefinedTableType</command:name><command:noun>DbaDbUserDefinedTableType</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database user defined table types</maml:para></maml:description></command:details><maml:description><maml:para>Gets database user defined table types</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbUserDefinedTableType</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Stored Procedures from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get Stored Procedures from specific database(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, UserDefinedTableType, Type Author: Ant Green (@ant_green) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUserDefinedTableType -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database Stored Procedures </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUserDefinedTableType -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the Stored Procedures for the db1 database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbUserDefinedTableType</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbView</command:name><command:noun>DbaDbView</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets database views for each SqlInstance.</maml:para></maml:description></command:details><maml:description><maml:para>Gets database views for each SqlInstance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbView</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get views from specific database(s) - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemView</maml:name><maml:description><maml:para>This switch removes all system objects from the view collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>The view(s) to include - all views are selected if not populated</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>To get views from specific database(s) - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemView</maml:name><maml:description><maml:para>This switch removes all system objects from the view collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>The view(s) to include - all views are selected if not populated</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: View, Database Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all database views </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the views for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance Server1 -ExcludeDatabase db1 </dev:code><dev:remarks><maml:para> Gets the views for all databases except db1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance Server1 -ExcludeSystemView </dev:code><dev:remarks><maml:para> Gets the views for all databases that are not system objects (there can be 400+ system views in each DB) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaDbView </dev:code><dev:remarks><maml:para> Gets the views for the databases on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance Server1 -ExcludeSystem | Get-DbaDbView </dev:code><dev:remarks><maml:para> Pipe the databases from Get-DbaDatabase into Get-DbaDbView </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbView -SqlInstance Server1 -Database db1 -View vw1 </dev:code><dev:remarks><maml:para> Gets the view vw1 for the db1 database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbView</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDbVirtualLogFile</command:name><command:noun>DbaDbVirtualLogFile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns database virtual log file information for database files on a SQL instance.</maml:para></maml:description></command:details><maml:description><maml:para>Having a transaction log file with too many virtual log files (VLFs) can hurt database performance.</maml:para><maml:para>Too 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.</maml:para><maml:para>References:</maml:para><maml:para>http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/</maml:para><maml:para>http://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx</maml:para><maml:para>If you've got a high number of VLFs, you can use Expand-DbaDbLogFile to reduce the number.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDbVirtualLogFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>If this switch is enabled, system database information will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>If this switch is enabled, system database information will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, VLF, Database, LogFile Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbVirtualLogFile -SqlInstance sqlcluster </dev:code><dev:remarks><maml:para> Returns all user database virtual log file details for the sqlcluster instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbVirtualLogFile -SqlInstance sqlserver | Group-Object -Property Database | Where-Object Count -gt 50 </dev:code><dev:remarks><maml:para> Returns user databases that have 50 or more VLFs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sqlserver','sqlcluster' | Get-DbaDbVirtualLogFile </dev:code><dev:remarks><maml:para> Returns all VLF information for the sqlserver and sqlcluster SQL Server instances. Processes data via the pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbVirtualLogFile -SqlInstance sqlcluster -Database db1, db2 </dev:code><dev:remarks><maml:para> Returns the VLF counts for the db1 and db2 databases on sqlcluster. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDbVirtualLogFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDefaultPath</command:name><command:noun>DbaDefaultPath</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the default SQL Server paths for data, logs and backups</maml:para></maml:description></command:details><maml:description><maml:para>Gets the default SQL Server paths for data, logs and backups</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDefaultPath</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, Log, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDefaultPath -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns the default file paths for sql01\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaDefaultPath Returns the default file paths for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDefaultPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDependency</command:name><command:noun>DbaDependency</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Finds object dependencies and their relevant creation scripts.</maml:para></maml:description></command:details><maml:description><maml:para>This function recursively finds all objects that depends on the input.</maml:para><maml:para>It will then retrieve rich information from them, including their creation scripts and the order in which it should be applied.</maml:para><maml:para>By using the 'Parents' switch, the function will instead retrieve all items that the input depends on (including their creation scripts).</maml:para><maml:para>For more details on dependency, see:</maml:para><maml:para>https://technet.microsoft.com/en-us/library/ms345449(v=sql.105).aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDependency</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The SMO object to parse</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllowSystemObjects</maml:name><maml:description><maml:para>Normally, system objects are ignored by this function as dependencies. This switch overrides that behavior.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parents</maml:name><maml:description><maml:para>Causes the function to retrieve all objects that the input depends on, rather than retrieving everything that depends on the input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSelf</maml:name><maml:description><maml:para>Includes the object whose dependencies are retrieves itself. Useful when exporting an entire logic structure in order to recreate it in another database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllowSystemObjects</maml:name><maml:description><maml:para>Normally, system objects are ignored by this function as dependencies. This switch overrides that behavior.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSelf</maml:name><maml:description><maml:para>Includes the object whose dependencies are retrieves itself. Useful when exporting an entire logic structure in order to recreate it in another database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The SMO object to parse</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parents</maml:name><maml:description><maml:para>Causes the function to retrieve all objects that the input depends on, rather than retrieving everything that depends on the input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Dependency, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $table = (Get-DbaDatabase -SqlInstance sql2012 -Database Northwind).tables | Where-Object Name -eq Customers </dev:code><dev:remarks><maml:para> PS C:\> $table | Get-DbaDependency Returns everything that depends on the "Customers" table </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDependency</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDeprecatedFeature</command:name><command:noun>DbaDeprecatedFeature</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays information relating to deprecated features for SQL Server 2005 and above.</maml:para></maml:description></command:details><maml:description><maml:para>Displays information relating to deprecated features for SQL Server 2005 and above.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDeprecatedFeature</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deprecated, General Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDeprecatedFeature -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check deprecated features for all databases on the servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDeprecatedFeature -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> Check deprecated features on server sql2008. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDeprecatedFeature</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDiskSpace</command:name><command:noun>DbaDiskSpace</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays disk information for all local disk on a server.</maml:para></maml:description></command:details><maml:description><maml:para>Returns a custom object with server name, name of disk, label of disk, total size, free size, percent free, block size and filesystem.</maml:para><maml:para>By default, this function only shows drives of types 2 and 3 (removable disk and local disk).</maml:para><maml:para>Requires Windows administrator access on SQL Servers</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDiskSpace</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unit</maml:name><maml:description><maml:para>This parameter has been deprecated and will be removed in 1.0.0 All properties previously generated through this command are present at the same time, but hidden by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDrive</maml:name><maml:description><maml:para>Filter out drives - format is C:\</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckFragmentation</maml:name><maml:description><maml:para>If this switch is enabled, fragmentation of all file systems will be checked. This will increase the runtime of the function by seconds or even minutes per volume.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Enabling this switch will cause the command to include ALL drives. By default, only local disks and removable disks are shown, and hidden volumes are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckFragmentation</maml:name><maml:description><maml:para>If this switch is enabled, fragmentation of all file systems will be checked. This will increase the runtime of the function by seconds or even minutes per volume.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDrive</maml:name><maml:description><maml:para>Filter out drives - format is C:\</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Enabling this switch will cause the command to include ALL drives. By default, only local disks and removable disks are shown, and hidden volumes are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unit</maml:name><maml:description><maml:para>This parameter has been deprecated and will be removed in 1.0.0 All properties previously generated through this command are present at the same time, but hidden by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Disk, Space, OS Author: Chrissy LeMaire (@cl), netnerds.net | Jakob Bindslet Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDiskSpace -ComputerName srv0042 </dev:code><dev:remarks><maml:para> Get disk space for the server srv0042. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDiskSpace -ComputerName srv0042 -Unit MB </dev:code><dev:remarks><maml:para> Get disk space for the server srv0042 and displays in megabytes (MB). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDiskSpace -ComputerName srv0042, srv0007 -Unit TB </dev:code><dev:remarks><maml:para> Get disk space from two servers and displays in terabytes (TB). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDiskSpace -ComputerName srv0042 -Force </dev:code><dev:remarks><maml:para> Get all disk and volume space information. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDiskSpace -ComputerName srv0042 -ExcludeDrive 'C:\' </dev:code><dev:remarks><maml:para> Get all disk and volume space information. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDiskSpace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaDump</command:name><command:noun>DbaDump</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Locate a SQL Server that has generated any memory dump files.</maml:para></maml:description></command:details><maml:description><maml:para>The type of dump included in the search include minidump, all-thread dump, or a full dump. The files have an extendion of .mdmp.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaDump</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Engine, Corruption Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDump -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Shows the detailed information for memory dump(s) located on sql2016 instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDump -SqlInstance sql2016 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Shows the detailed information for memory dump(s) located on sql2016 instance. Logs into the SQL Server using the SQL login 'sqladmin' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaDump</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns endpoint objects from a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns endpoint objects from a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaEndpoint</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Return only specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Return only specific types of endpoints. Options include: DatabaseMirroring, ServiceBroker, Soap, and TSql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Return only specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Return only specific types of endpoints. Options include: DatabaseMirroring, ServiceBroker, Soap, and TSql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEndpoint -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all endpoints on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEndpoint -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all endpoints for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaErrorLog</command:name><command:noun>DbaErrorLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the "SQL Error Log" of an instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets the "SQL Error Log" of an instance. Returns all 10 error logs by default.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaErrorLog</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogNumber</maml:name><maml:description><maml:para>An Int32 value that specifies the index number of the error log required. Error logs are listed 0 through 99, where 0 is the current error log and 99 is potential oldest log file. SQL Server errorlog rollover defaults to 6, but can be increased to 99. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/scm-services-configure-sql-server-error-logs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Filter results based on the Source of the error (e.g. Logon, Server, etc.)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Text</maml:name><maml:description><maml:para>Filter results based on a pattern of text (e.g. "login failed", "error: 12345").</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>After</maml:name><maml:description><maml:para>Filter the results based on datetime value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Before</maml:name><maml:description><maml:para>Filter the results based on datetime value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>After</maml:name><maml:description><maml:para>Filter the results based on datetime value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Before</maml:name><maml:description><maml:para>Filter the results based on datetime value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogNumber</maml:name><maml:description><maml:para>An Int32 value that specifies the index number of the error log required. Error logs are listed 0 through 99, where 0 is the current error log and 99 is potential oldest log file. SQL Server errorlog rollover defaults to 6, but can be increased to 99. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/scm-services-configure-sql-server-error-logs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Filter results based on the Source of the error (e.g. Logon, Server, etc.)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>TThe target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Text</maml:name><maml:description><maml:para>Filter results based on a pattern of text (e.g. "login failed", "error: 12345").</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Logging, Instance, ErrorLog Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> Returns every log entry from sql01\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint -LogNumber 3, 6 </dev:code><dev:remarks><maml:para> Returns all log entries for log number 3 and 6 on sql01\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint -Source Logon </dev:code><dev:remarks><maml:para> Returns every log entry, with a source of Logon, from sql01\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint -LogNumber 3 -Text "login failed" </dev:code><dev:remarks><maml:para> Returns every log entry for log number 3, with "login failed" in the text, from sql01\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaErrorLog -LogNumber 0 Returns the most recent SQL Server error logs for "sql2014","sql2016" and "sqlcluster\sharepoint" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint -After '2016-11-14 00:00:00' </dev:code><dev:remarks><maml:para> Returns every log entry found after the date 14 November 2016 from sql101\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLog -SqlInstance sql01\sharepoint -Before '2016-08-16 00:00:00' </dev:code><dev:remarks><maml:para> Returns every log entry found before the date 16 August 2016 from sql101\sharepoint SQL Server instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaErrorLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaErrorLogConfig</command:name><command:noun>DbaErrorLogConfig</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Pulls the configuration for the ErrorLog on a given SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Pulls the configuration for the ErrorLog on a given SQL Server instance.</maml:para><maml:para>Includes error log path, number of log files configured and size (SQL Server 2012+ only)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaErrorLogConfig</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, ErrorLog, Logging Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaErrorLogConfig -SqlInstance server2017,server2014 </dev:code><dev:remarks><maml:para> Returns error log configuration for server2017 and server2014 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaErrorLogConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaEstimatedCompletionTime</command:name><command:noun>DbaEstimatedCompletionTime</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets execution and estimated completion time information for queries</maml:para></maml:description></command:details><maml:description><maml:para>Gets execution and estimated completion time information for queries</maml:para><maml:para>Percent complete will show for the following commands</maml:para><maml:para>ALTER INDEX REORGANIZE</maml:para><maml:para>AUTO_SHRINK option with ALTER DATABASE</maml:para><maml:para>BACKUP DATABASE</maml:para><maml:para>DBCC CHECKDB</maml:para><maml:para>DBCC CHECKFILEGROUP</maml:para><maml:para>DBCC CHECKTABLE</maml:para><maml:para>DBCC INDEXDEFRAG</maml:para><maml:para>DBCC SHRINKDATABASE</maml:para><maml:para>DBCC SHRINKFILE</maml:para><maml:para>RECOVERY</maml:para><maml:para>RESTORE DATABASE</maml:para><maml:para>ROLLBACK</maml:para><maml:para>TDE ENCRYPTION</maml:para><maml:para>For 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</maml:para><maml:para>The command will only return queries that provide estimated completion time, all other running queries will be filtered out.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaEstimatedCompletionTime</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Query Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEstimatedCompletionTime -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets estimated completion times for queries performed against the entire server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEstimatedCompletionTime -SqlInstance sql2016 | Select-Object * </dev:code><dev:remarks><maml:para> Gets estimated completion times for queries performed against the entire server PLUS the SQL query text of each command </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEstimatedCompletionTime -SqlInstance sql2016 | Where-Object { $_.Text -match 'somequerytext' } </dev:code><dev:remarks><maml:para> Gets results for commands whose queries only match specific text (match is like LIKE but way more powerful) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEstimatedCompletionTime -SqlInstance sql2016 -Database Northwind,pubs,Adventureworks2014 </dev:code><dev:remarks><maml:para> Gets estimated completion times for queries performed against the Northwind, pubs, and Adventureworks2014 databases </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaEstimatedCompletionTime</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaExecutionPlan</command:name><command:noun>DbaExecutionPlan</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets execution plans and metadata</maml:para></maml:description></command:details><maml:description><maml:para>Gets execution plans and metadata. Can pipe to Export-DbaExecutionPlan</maml:para><maml:para>Thanks to following for the queries:</maml:para><maml:para>https://www.simple-talk.com/sql/t-sql-programming/dmvs-for-query-plan-metadata/</maml:para><maml:para>http://www.scarydba.com/2017/02/13/export-plans-cache-sqlplan-file/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaExecutionPlan</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return execution plans and metadata for only specific databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Return execution plans and metadata for all but these specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceCreation</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceLastExecution</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeEmptyQueryPlan</maml:name><maml:description><maml:para>Exclude results with empty query plan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Returns a ton of raw information about the execution plans</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Return execution plans and metadata for only specific databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Return execution plans and metadata for all but these specific databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeEmptyQueryPlan</maml:name><maml:description><maml:para>Exclude results with empty query plan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Returns a ton of raw information about the execution plans</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceCreation</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SinceLastExecution</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Gets all execution plans on sqlserver2014a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sqlserver2014a -Database db1, db2 -SinceLastExecution '2016-07-01 10:47:00' </dev:code><dev:remarks><maml:para> Gets all execution plans for databases db1 and db2 on sqlserver2014a since July 1, 2016 at 10:47 AM. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sqlserver2014a, sql2016 -Exclude db1 | Format-Table </dev:code><dev:remarks><maml:para> Gets execution plan info for all databases except db1 on sqlserver2014a and sql2016 and makes the output pretty </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExecutionPlan -SqlInstance sql2014 -Database AdventureWorks2014, pubs -Force </dev:code><dev:remarks><maml:para> Gets super detailed information for execution plans on only for AdventureWorks2014 and pubs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sqlserver2014a","sql2016t" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaExecutionPlan -Force Gets super detailed information for execution plans on sqlserver2014a and sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaExecutionPlan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaExtendedProperty</command:name><command:noun>DbaExtendedProperty</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets extended properties</maml:para></maml:description></command:details><maml:description><maml:para>Gets extended properties</maml:para><maml:para>This command works out of the box with databases but you can add or get extended properties from any object. Just pipe it in it'll grab the properties and print them out.</maml:para><maml:para>You can get extended properties on all these different types of objects:</maml:para><maml:para>Aggregate</maml:para><maml:para>Assembly</maml:para><maml:para>Column</maml:para><maml:para>Constraint</maml:para><maml:para>Contract</maml:para><maml:para>Database</maml:para><maml:para>Event Notification</maml:para><maml:para>Filegroup</maml:para><maml:para>Function</maml:para><maml:para>Index</maml:para><maml:para>Logical File Name</maml:para><maml:para>Message Type</maml:para><maml:para>Parameter</maml:para><maml:para>Partition Function</maml:para><maml:para>Partition Scheme</maml:para><maml:para>Procedure</maml:para><maml:para>Queue</maml:para><maml:para>Remote Service Binding</maml:para><maml:para>Route</maml:para><maml:para>Rule</maml:para><maml:para>Schema</maml:para><maml:para>Service</maml:para><maml:para>Synonym</maml:para><maml:para>Table</maml:para><maml:para>Trigger</maml:para><maml:para>Type</maml:para><maml:para>View</maml:para><maml:para>Xml Schema Collection</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaExtendedProperty</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get extended properties from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Get specific extended properties by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Dba* commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Get extended properties from specific database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Dba* commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Get specific extended properties by name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, ExtendedProperty Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExtendedProperty -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all extended properties on all databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExtendedProperty -SqlInstance Server1 -Database db1 </dev:code><dev:remarks><maml:para> Gets the extended properties for the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExtendedProperty -SqlInstance Server1 -Database db1 -Name info1, info2 </dev:code><dev:remarks><maml:para> Gets the info1 and info2 extended properties within the db1 database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbStoredProcedure -SqlInstance localhost -Database tempdb | Get-DbaExtendedProperty </dev:code><dev:remarks><maml:para> Get the extended properties for all stored procedures in the tempdb database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance localhost -Database mydb -Table mytable | Get-DbaExtendedProperty </dev:code><dev:remarks><maml:para> Get the extended properties for the mytable table in the mydb database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaExtendedProperty</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaExtendedProtection</command:name><command:noun>DbaExtendedProtection</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get the Extended Protection setting of the SQL Server network configuration.</maml:para></maml:description></command:details><maml:description><maml:para>Get the Extended Protection setting of the SQL Server network configuration.</maml:para><maml:para>This setting requires access to the Windows Server and not the SQL Server instance. The setting is found in SQL Server Configuration Manager under the properties of SQL Server Network Configuration > Protocols for "InstanceName".</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaExtendedProtection</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Security Author: Claudio Silva (@claudioessilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExtendedProtection </dev:code><dev:remarks><maml:para> Gets Extended Protection on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExtendedProtection -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Set Extended Protection of SQL Engine for the SQL2008R2SP2 on sql01 to "Off". Uses Windows Credentials to both connect and modify the registry. Gets Extended Protection for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and view the registry. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaExtendedProtection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaExternalProcess</command:name><command:noun>DbaExternalProcess</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets OS processes created by SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets OS processes created by SQL Server</maml:para><maml:para>Helps when finding hung sessions with External Wait Types</maml:para><maml:para>https://web.archive.org/web/20201027122300/http://vickyharp.com/2013/12/killing-sessions-with-external-wait-types/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaExternalProcess</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server host computer</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server host computer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Process Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExternalProcess -ComputerName SERVER01, SERVER02 </dev:code><dev:remarks><maml:para> Gets OS processes created by SQL Server on SERVER01 and SERVER02 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaExternalProcess</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaFeature</command:name><command:noun>DbaFeature</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)</maml:para></maml:description></command:details><maml:description><maml:para>Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)</maml:para><maml:para>Inspired by Dave Mason's (@BeginTry) post at</maml:para><maml:para>https://itsalljustelectrons.blogspot.be/2018/04/SQL-Server-Discovery-Report.html</maml:para><maml:para>Assumptions:</maml:para><maml:para>1. The sub-folder "Microsoft SQL Server" exists in [System.Environment]::GetFolderPath("ProgramFiles"),</maml:para><maml:para>even if SQL was installed to a non-default path. This has been</maml:para><maml:para>verified on SQL 2008R2 and SQL 2012. Further verification may be needed.</maml:para><maml:para>2. The discovery report displays installed components for the version of SQL</maml:para><maml:para>Server associated with setup.exe, along with installed components of all</maml:para><maml:para>lesser versions of SQL Server that are installed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaFeature</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. If the target is not localhost, it must have PowerShell remoting enabled. Note that this is not the SqlInstance, but rather the ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. If the target is not localhost, it must have PowerShell remoting enabled. Note that this is not the SqlInstance, but rather the ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Feature, Component, General Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFeature -ComputerName sql2017, sql2016, sql2005 </dev:code><dev:remarks><maml:para> Gets all SQL Server features for all instances on sql2017, sql2016 and sql2005. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFeature -Verbose </dev:code><dev:remarks><maml:para> Gets all SQL Server features for all instances on localhost. Outputs to screen if no instances are found. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFeature -ComputerName sql2017 -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Gets all SQL Server features for all instances on sql2017 using the ad\sqladmin credential (which has access to the Windows Server). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaFeature</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaFile</command:name><command:noun>DbaFile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaFile finds files in any directory specified on a remote SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>This command searches all specified directories, allowing a DBA to see file information on a server without direct access</maml:para><maml:para>You 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.</maml:para><maml:para>Thanks to serg-52 for the query: https://www.sqlservercentral.com/Forums/Topic1642213-391-1.aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Used to specify extra directories to search in addition to the default data directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Used to specify filter by filetype. No dot required, just pass the extension.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Depth</maml:name><maml:description><maml:para>Used to specify recursive folder depth. Default is 1, non-recursive.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Depth</maml:name><maml:description><maml:para>Used to specify recursive folder depth. Default is 1, non-recursive.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Used to specify filter by filetype. No dot required, just pass the extension.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Used to specify extra directories to search in addition to the default data directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, File, Path Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFile -SqlInstance sqlserver2014a -Path E:\Dir1 </dev:code><dev:remarks><maml:para> Logs into the SQL Server "sqlserver2014a" using Windows credentials and searches E:\Dir for all files </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFile -SqlInstance sqlserver2014a -SqlCredential $cred -Path 'E:\sql files' </dev:code><dev:remarks><maml:para> Logs into the SQL Server "sqlserver2014a" using alternative credentials and returns all files in 'E:\sql files' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $all = Get-DbaDefaultPath -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaFile -SqlInstance sql2014 -Path $all.Data, $all.Log, $all.Backup -Depth 3 Returns the files in the default data, log and backup directories on sql2014, 3 directories deep (recursively). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFile -SqlInstance sql2014 -Path 'E:\Dir1', 'E:\Dir2' </dev:code><dev:remarks><maml:para> Returns the files in "E:\Dir1" and "E:Dir2" on sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFile -SqlInstance sql2014, sql2016 -Path 'E:\Dir1' -FileType fsf, mld </dev:code><dev:remarks><maml:para> Finds files in E:\Dir1 ending with ".fsf" and ".mld" for both the servers sql2014 and sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaFilestream</command:name><command:noun>DbaFilestream</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the status of Filestream on specified SQL Server for both the Service and Instance levels.</maml:para></maml:description></command:details><maml:description><maml:para>Returns the status of Filestream on specified SQL Server for both the Service and Instance levels.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaFilestream</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target Windows server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target Windows server using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Filestream Author: Stuart Moore (@napalmgram) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFilestream -SqlInstance server1\instance2 </dev:code><dev:remarks><maml:para> Will return the status of Filestream configuration for the service and instance server1\instance2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFilestream -SqlInstance server1\instance2 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Prompts for the password to the SQL Login "sqladmin" then returns the status of Filestream configuration for the service and instance server1\instance2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaFilestream</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaFirewallRule</command:name><command:noun>DbaFirewallRule</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns firewall rules for SQL Server instances from the target computer.</maml:para></maml:description></command:details><maml:description><maml:para>Returns firewall rules for SQL Server instances from the target computer.</maml:para><maml:para>As the group and the names of the firewall rules are fixed, this command</maml:para><maml:para>only works for rules created with New-DbaFirewallRule.</maml:para><maml:para>This is basically a wrapper around Get-NetFirewallRule executed at the target computer.</maml:para><maml:para>So this only works if Get-NetFirewallRule works on the target computer.</maml:para><maml:para>The functionality is currently limited. Help to extend the functionality is welcome.</maml:para><maml:para>As long as you can read this note here, there may be breaking changes in future versions.</maml:para><maml:para>So please review your scripts using this command after updating dbatools.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaFirewallRule</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Returns firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) * AllInstance - for all firewall rules on the target computer related to SQL Server If this parameter is not used, the firewall rule for the SQL Server instance will be returned and in case the instance is listening on a port other than 1433, also the firewall rule for the SQL Server Browser will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Returns firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) * AllInstance - for all firewall rules on the target computer related to SQL Server If this parameter is not used, the firewall rule for the SQL Server instance will be returned and in case the instance is listening on a port other than 1433, also the firewall rule for the SQL Server Browser will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, Firewall Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFirewallRule -SqlInstance SRV1 </dev:code><dev:remarks><maml:para> Returns the firewall rule for the default instance on SRV1. In case the instance is not listening on port 1433, it also returns the firewall rule for the SQL Server Browser. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFirewallRule -SqlInstance SRV1\SQL2016 -Type Engine </dev:code><dev:remarks><maml:para> Returns only the firewall rule for the instance SQL2016 on SRV1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFirewallRule -SqlInstance SRV1\SQL2016 -Type Browser </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaFirewallRule -SqlInstance SRV1 -Type Browser Both commands return the firewall rule for the SQL Serer Browser on SRV1. As the Browser is not bound to a specific instance, only the computer part of SqlInstance is used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFirewallRule -SqlInstance SRV1\SQL2016 -Type AllInstance </dev:code><dev:remarks><maml:para> Returns all firewall rules on the computer SRV1 related to SQL Server. The value "AllInstance" only uses the computer name part of SqlInstance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaFirewallRule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaForceNetworkEncryption</command:name><command:noun>DbaForceNetworkEncryption</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Force Encryption settings for a SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets Force Encryption settings for a SQL Server instance. Note that this requires access to the Windows Server - not the SQL instance itself.</maml:para><maml:para>This setting is found in Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaForceNetworkEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaForceNetworkEncryption </dev:code><dev:remarks><maml:para> Gets Force Encryption properties on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaForceNetworkEncryption -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Gets Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and view the registry. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaForceNetworkEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaHelpIndex</command:name><command:noun>DbaHelpIndex</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns size, row and configuration information for indexes in databases.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>As this uses SQL Server DMVs to access the data it will only work in 2005 and up (sorry folks still running SQL Server 2000).</maml:para><maml:para>For performance reasons certain statistics information will not be returned from SQL Server 2005 if an ObjectName is not provided.</maml:para><maml:para>The data includes:</maml:para><maml:para>- ObjectName: the table containing the index</maml:para><maml:para>- IndexType: clustered/non-clustered/columnstore and whether the index is unique/primary key</maml:para><maml:para>- KeyColumns: the key columns of the index</maml:para><maml:para>- IncludeColumns: any include columns in the index</maml:para><maml:para>- FilterDefinition: any filter that may have been used in the index</maml:para><maml:para>- DataCompression: row/page/none depending upon whether or not compression has been used</maml:para><maml:para>- IndexReads: the number of reads of the index since last restart or index rebuild</maml:para><maml:para>- IndexUpdates: the number of writes to the index since last restart or index rebuild</maml:para><maml:para>- SizeKB: the size the index in KB</maml:para><maml:para>- IndexRows: the number of the rows in the index (note filtered indexes will have fewer rows than exist in the table)</maml:para><maml:para>- IndexLookups: the number of lookups that have been performed (only applicable for the heap or clustered index)</maml:para><maml:para>- MostRecentlyUsed: when the index was most recently queried (default to 1900 for when never read)</maml:para><maml:para>- StatsSampleRows: the number of rows queried when the statistics were built/rebuilt (not included in SQL Server 2005 unless ObjectName is specified)</maml:para><maml:para>- StatsRowMods: the number of changes to the statistics since the last rebuild</maml:para><maml:para>- HistogramSteps: the number of steps in the statistics histogram (not included in SQL Server 2005 unless ObjectName is specified)</maml:para><maml:para>- StatsLastUpdated: when the statistics were last rebuilt (not included in SQL Server 2005 unless ObjectName is specified)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaHelpIndex</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>The name of a table for which you want to obtain the index information. If the two part naming convention for an object is not used it will use the default schema for the executing user. If not passed it will return data on all indexes in a given database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeStats</maml:name><maml:description><maml:para>If this switch is enabled, statistics as well as indexes will be returned in the output (statistics information such as the StatsRowMods will always be returned for indexes).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDataTypes</maml:name><maml:description><maml:para>If this switch is enabled, the output will include the data type of each column that makes up a part of the index definition (key and include columns).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, results may be less user-readable but more suitable for processing by other code.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFragmentation</maml:name><maml:description><maml:para>If this switch is enabled, the output will include fragmentation information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDataTypes</maml:name><maml:description><maml:para>If this switch is enabled, the output will include the data type of each column that makes up a part of the index definition (key and include columns).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFragmentation</maml:name><maml:description><maml:para>If this switch is enabled, the output will include fragmentation information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeStats</maml:name><maml:description><maml:para>If this switch is enabled, statistics as well as indexes will be returned in the output (statistics information such as the StatsRowMods will always be returned for indexes).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>The name of a table for which you want to obtain the index information. If the two part naming convention for an object is not used it will use the default schema for the executing user. If not passed it will return data on all indexes in a given database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, results may be less user-readable but more suitable for processing by other code.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Index Author: Nic Cain, sirsql.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB </dev:code><dev:remarks><maml:para> Returns information on all indexes on the MyDB database on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB,MyDB2 </dev:code><dev:remarks><maml:para> Returns information on all indexes on the MyDB & MyDB2 databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 </dev:code><dev:remarks><maml:para> Returns index information on the object dbo.Table1 in the database MyDB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -IncludeStats </dev:code><dev:remarks><maml:para> Returns information on the indexes and statistics for the table dbo.Table1 in the MyDB database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -IncludeDataTypes </dev:code><dev:remarks><maml:para> Returns the index information for the table dbo.Table1 in the MyDB database, and includes the data types for the key and include columns. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -ObjectName dbo.Table1 -Raw </dev:code><dev:remarks><maml:para> Returns the index information for the table dbo.Table1 in the MyDB database, and returns the numerical data without localized separators. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -IncludeStats -Raw </dev:code><dev:remarks><maml:para> Returns the index information for all indexes in the MyDB database as well as their statistics, and formats the numerical data without localized separators. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHelpIndex -SqlInstance localhost -Database MyDB -IncludeFragmentation </dev:code><dev:remarks><maml:para> Returns the index information for all indexes in the MyDB database as well as their fragmentation </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database MyDB | Get-DbaHelpIndex </dev:code><dev:remarks><maml:para> Returns the index information for all indexes in the MyDB database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaHelpIndex</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaHideInstance</command:name><command:noun>DbaHideInstance</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Hide Instance settings for a SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets Hide Instance settings for a SQL Server instance. Note that this requires access to the Windows Server - not the SQL instance itself.</maml:para><maml:para>This setting is found in Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaHideInstance</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Security Author: Tracy Boggiano @TracyBoggiano, databaseuperhero.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHideInstance </dev:code><dev:remarks><maml:para> Gets Hide Instance properties on the default (MSSQLSERVER) instance on localhost - requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaHideInstance -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Gets Force Network Encryption for the SQL2008R2SP2 on sql01. Uses Windows Credentials to both login and view the registry. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaHideInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstalledPatch</command:name><command:noun>DbaInstalledPatch</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Retrives a historical list of all SQL Patches (CUs, Service Packs & Hot-fixes) installed on a Computer.</maml:para></maml:description></command:details><maml:description><maml:para>Retrives a historical list of all SQL Patches (CUs, Service Packs & Hot-fixes) installed on a Computer.</maml:para><maml:para>To test to see if your build is up to date, use Test-DbaBuild.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstalledPatch</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Allows you to specify a comma separated list of servers to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Updates, Patches Author: Hiram Fleitas, @hiramfleitas, fleitasarts.com Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstalledPatch -ComputerName HiramSQL1, HiramSQL2 </dev:code><dev:remarks><maml:para> Gets a list of SQL Server patches installed on HiramSQL1 and HiramSQL2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Content C:\Monitoring\Servers.txt | Get-DbaInstalledPatch </dev:code><dev:remarks><maml:para> Gets the SQL Server patches from a list of computers in C:\Monitoring\Servers.txt. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstalledPatch -ComputerName SRV1 | Sort-Object InstallDate.Date </dev:code><dev:remarks><maml:para> Gets the SQL Server patches from SRV1 and orders by date. Note that we use a special customizable date datatype for InstallDate so you'll need InstallDate.Date </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstalledPatch</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceAudit</command:name><command:noun>DbaInstanceAudit</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Security Audit information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaInstanceAudit command gets SQL Security Audit information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceAudit</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Audit</maml:name><maml:description><maml:para>Return only specific audits</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAudit</maml:name><maml:description><maml:para>Exclude specific audits</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Audit</maml:name><maml:description><maml:para>Return only specific audits</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAudit</maml:name><maml:description><maml:para>Exclude specific audits</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Audit, Security, SqlAudit Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceAudit -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Security Audits on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceAudit -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Security Audits for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceAudit</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceAuditSpecification</command:name><command:noun>DbaInstanceAuditSpecification</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Security Audit Specification information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaInstanceAuditSpecification command gets SQL Security Audit Specification information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceAuditSpecification</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Audit, Security, SqlAudit Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceAuditSpecification -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Security Audit Specifications on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceAuditSpecification -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Security Audit Specifications for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceAuditSpecification</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceInstallDate</command:name><command:noun>DbaInstanceInstallDate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the install date of a SQL Instance and Windows Server.</maml:para></maml:description></command:details><maml:description><maml:para>This command returns:</maml:para><maml:para>SqlInstallDate</maml:para><maml:para>WindowsInstallDate (use -IncludeWindows)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceInstallDate</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server as a different Windows user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeWindows</maml:name><maml:description><maml:para>Includes the Windows Server Install date information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server as a different Windows user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeWindows</maml:name><maml:description><maml:para>Includes the Windows Server Install date information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Install, Instance, Utility Author: Mitchell Hamann (@SirCaptainMitch), mitchellhamann.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceInstallDate -SqlInstance SqlBox1\Instance2 </dev:code><dev:remarks><maml:para> Returns an object with SQL Instance Install date as a string. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceInstallDate -SqlInstance winserver\sqlexpress, sql2016 </dev:code><dev:remarks><maml:para> Returns an object with SQL Instance Install date as a string for both SQLInstances that are passed to the cmdlet. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sqlserver2014a', 'sql2016' | Get-DbaInstanceInstallDate </dev:code><dev:remarks><maml:para> Returns an object with SQL Instance Install date as a string for both SQLInstances that are passed to the cmdlet via the pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceInstallDate -SqlInstance sqlserver2014a, sql2016 -IncludeWindows </dev:code><dev:remarks><maml:para> Returns an object with the Windows Install date and the SQL install date as a string. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Get-DbaInstanceInstallDate </dev:code><dev:remarks><maml:para> Returns an object with SQL Instance install date as a string for every server listed in the Central Management Server on sql2014 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceInstallDate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceProperty</command:name><command:noun>DbaInstanceProperty</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Server instance properties of one or more instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaInstanceProperty command gets SQL Server instance properties from the SMO object sqlserver.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceProperty</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceProperty</maml:name><maml:description><maml:para>SQL Server instance property(ies) to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeInstanceProperty</maml:name><maml:description><maml:para>SQL Server instance property(ies) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeInstanceProperty</maml:name><maml:description><maml:para>SQL Server instance property(ies) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceProperty</maml:name><maml:description><maml:para>SQL Server instance property(ies) to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Configure, Configuration, General Author: Klaas Vandenberghe (@powerdbaklaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProperty -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns SQL Server instance properties on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProperty -SqlInstance sql2, sql4\sqlexpress </dev:code><dev:remarks><maml:para> Returns SQL Server instance properties on default instance on sql2 and sqlexpress instance on sql4 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2','sql4' | Get-DbaInstanceProperty </dev:code><dev:remarks><maml:para> Returns SQL Server instance properties on sql2 and sql4 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProperty -SqlInstance sql2,sql4 -InstanceProperty DefaultFile </dev:code><dev:remarks><maml:para> Returns SQL Server instance property DefaultFile on instance sql2 and sql4 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProperty -SqlInstance sql2,sql4 -ExcludeInstanceProperty DefaultFile </dev:code><dev:remarks><maml:para> Returns all SQL Server instance properties except DefaultFile on instance sql2 and sql4 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaInstanceProperty -SqlInstance sql2 -SqlCredential $cred Connects using sqladmin credential and returns SQL Server instance properties from sql2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceProperty</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceProtocol</command:name><command:noun>DbaInstanceProtocol</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the SQL Server related server protocols on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the SQL Server related server protocols on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para><maml:para>The server protocols can be enabled and disabled when retrieved via WSMan.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceProtocol</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, Protocol, OS Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProtocol -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the SQL Server related server protocols on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaInstanceProtocol </dev:code><dev:remarks><maml:para> Gets the SQL Server related server protocols on computers sql1, sql2 and sql3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceProtocol -ComputerName sql1,sql2 </dev:code><dev:remarks><maml:para> Gets the SQL Server related server protocols on computers sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> (Get-DbaInstanceProtocol -ComputerName sql1 | Where-Object { $_.DisplayName -eq 'Named Pipes' }).Disable() </dev:code><dev:remarks><maml:para> Disables the VIA ServerNetworkProtocol on computer sql1. If successful, return code 0 is shown. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceProtocol</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceTrigger</command:name><command:noun>DbaInstanceTrigger</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get all existing server triggers on one or more SQL instances.</maml:para></maml:description></command:details><maml:description><maml:para>Get all existing server triggers on one or more SQL instances.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceTrigger</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Trigger, General Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceTrigger -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns all server triggers on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceTrigger</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaInstanceUserOption</command:name><command:noun>DbaInstanceUserOption</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Instance user options of one or more instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaInstanceUserOption command gets SQL Instance user options from the SMO object sqlserver.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaInstanceUserOption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Configure, UserOption, General Author: Klaas Vandenberghe (@powerdbaklaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceUserOption -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns SQL Instance user options on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceUserOption -SqlInstance sql2, sql4\sqlexpress </dev:code><dev:remarks><maml:para> Returns SQL Instance user options on default instance on sql2 and sqlexpress instance on sql4 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2','sql4' | Get-DbaInstanceUserOption </dev:code><dev:remarks><maml:para> Returns SQL Instance user options on sql2 and sql4 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaInstanceUserOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaIoLatency</command:name><command:noun>DbaIoLatency</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays IO subsystem latency statistics from sys.dm_io_virtual_file_stats. Works on SQL Server 2005 and above.</maml:para></maml:description></command:details><maml:description><maml:para>This command is based off of Paul Randal's post "Advanced SQL Server performance tuning"</maml:para><maml:para>Returns both raw and aggregate information</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/how-to-examine-io-subsystem-latencies-from-within-sql-server/</maml:para><maml:para> https://www.sqlskills.com/blogs/paul/capturing-io-latencies-period-time/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaIoLatency</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, IOLatency Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaIoLatency -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Get IO subsystem latency statistics for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaIoLatency -SqlInstance sql2008 | Select-Object * | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Collects all IO subsystem latency statistics on server sql2008 into a Data Table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008','sqlserver2012' | Get-DbaIoLatency </dev:code><dev:remarks><maml:para> Get IO subsystem latency statistics for servers sql2008 and sqlserver2012 via pipline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaIoLatency -SqlInstance sql2008 -SqlCredential $cred Connects using sqladmin credential and returns IO subsystem latency statistics from sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaIoLatency</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaKbUpdate</command:name><command:noun>DbaKbUpdate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets download links and detailed information for KB files (SPs/hotfixes/CUs, etc)</maml:para></maml:description></command:details><maml:description><maml:para>Parses catalog.update.microsoft.com and grabs details for KB files (SPs/hotfixes/CUs, etc)</maml:para><maml:para>Because Microsoft's RSS feed does not work, the command has to parse a few webpages which can result in slowness.</maml:para><maml:para>Use the Simple parameter for simplified output and faster results.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaKbUpdate</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The KB name or number. For example, KB4057119 or 4057119.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>A lil faster. Returns, at the very least: Title, Architecture, Language, Hotfix, UpdateId and Link</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Cumulative Updates come in one file for all languages, but Service Packs have a file for every language. If you want to get only a specific language, use this parameter. You you can press tab for auto-complete or use the two letter code that is used for Accept-Language HTTP header, e. g. "en" for English or "de" for German.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Cumulative Updates come in one file for all languages, but Service Packs have a file for every language. If you want to get only a specific language, use this parameter. You you can press tab for auto-complete or use the two letter code that is used for Accept-Language HTTP header, e. g. "en" for English or "de" for German.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The KB name or number. For example, KB4057119 or 4057119.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>A lil faster. Returns, at the very least: Title, Architecture, Language, Hotfix, UpdateId and Link</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install, Patch, Update Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119 </dev:code><dev:remarks><maml:para> Gets detailed information about KB4057119. This works for SQL Server or any other KB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119, 4057114 </dev:code><dev:remarks><maml:para> Gets detailed information about KB4057119 and KB4057114. This works for SQL Server or any other KB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119, 4057114 -Simple </dev:code><dev:remarks><maml:para> A lil faster. Returns, at the very least: Title, Architecture, Language, Hotfix, UpdateId and Link </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119 -Language ja </dev:code><dev:remarks><maml:para> Gets detailed information about KB4057119 in Japanese. This works for SQL Server or any other KB. (Link property includes the links for Japanese version of SQL Server if the KB was Service Pack) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119 -Language ja | Save-DbaKbUpdate </dev:code><dev:remarks><maml:para> Downloads Japanese version of KB4057119. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaKbUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLastBackup</command:name><command:noun>DbaLastBackup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get date/time for last known backups of databases.</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves and compares the date/time for the last known backups, as well as the creation date/time for the database.</maml:para><maml:para>Default output includes columns Server, Database, LastFullBackup, LastDiffBackup, LastLogBackup.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLastBackup</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastBackup -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns a custom object with Server name, Database name, and the date the last time backups were performed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastBackup -SqlInstance ServerA\sql987 | Select-Object * </dev:code><dev:remarks><maml:para> Returns 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 status is. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastBackup -SqlInstance ServerA\sql987 | Select-Object * | Out-Gridview </dev:code><dev:remarks><maml:para> Returns a gridview displaying ComputerName, InstanceName, SqlInstance, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, LastFullBackupIsCopyOnly, LastDiffBackupIsCopyOnly, LastLogBackupIsCopyOnly, DatabaseCreated, DaysSinceDbCreated, Status </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $MyInstances | Get-DbaLastBackup | Where-Object -FilterScript { $_.LastFullBackup.Date -lt (Get-Date).AddDays(-3) } | Format-Table -Property SqlInstance, Database, LastFullBackup </dev:code><dev:remarks><maml:para> Returns all databases on the given instances without a full backup in the last three days. Note that the property LastFullBackup is a custom object, with the subproperty Date of type datetime and therefore suitable for comparison with dates. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastBackup -SqlInstance ServerA\sql987 | Where-Object { $_.LastFullBackupIsCopyOnly -eq $true } </dev:code><dev:remarks><maml:para> Filters for the databases that had a copy_only full backup done as the last backup. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLastBackup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLastGoodCheckDb</command:name><command:noun>DbaLastGoodCheckDb</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get date/time for last known good DBCC CHECKDB</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves and compares the date/time for the last known good DBCC CHECKDB, as well as the creation date/time for the database.</maml:para><maml:para>This function supports SQL Server 2005 and higher.</maml:para><maml:para>Please note that this script uses the DBCC DBINFO() WITH TABLERESULTS. DBCC DBINFO has several known weak points, such as:</maml:para><maml:para>- DBCC DBINFO is an undocumented feature/command.</maml:para><maml:para>- The LastKnowGood timestamp is updated when a DBCC CHECKFILEGROUP is performed.</maml:para><maml:para>- The LastKnowGood timestamp is updated when a DBCC CHECKDB WITH PHYSICAL_ONLY is performed.</maml:para><maml:para>- The LastKnowGood timestamp does not get updated when a database in READ_ONLY.</maml:para><maml:para>An empty ($null) LastGoodCheckDb result indicates that a good DBCC CHECKDB has never been performed.</maml:para><maml:para>SQL Server 2008R2 has a "bug" that causes each databases to possess two dbi_dbccLastKnownGood fields, instead of the normal one.</maml:para><maml:para>This script will only display the newest timestamp. If -Verbose is specified, the function will announce every time more than one dbi_dbccLastKnownGood fields is encountered.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLastGoodCheckDb</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CHECKDB, Database, Utility Author: Jakob Bindslet (jakob@bindslet.dk) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Ref: DBCC CHECKDB: https://msdn.microsoft.com/en-us/library/ms176064.aspx http://www.sqlcopilot.com/dbcc-checkdb.html Data Purity: http://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-how-to-tell-if-data-purity-checks-will-be-run/ https://www.mssqltips.com/sqlservertip/1988/ensure-sql-server-data-purity-checks-are-performed/ </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastGoodCheckDb -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns a custom object displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastGoodCheckDb -SqlInstance ServerA\sql987 -SqlCredential sqladmin | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Returns a formatted table displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled. Authenticates using SQL Server authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLastGoodCheckDb -SqlInstance sql2016 -ExcludeDatabase "TempDB" | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Returns a formatted table displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled. All databases except for "TempDB" will be displayed in the output. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database DB1, DB2 | Get-DbaLastGoodCheckDb | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Returns a formatted table displaying Server, Database, DatabaseCreated, LastGoodCheckDb, DaysSinceDbCreated, DaysSinceLastGoodCheckDb, Status and DataPurityEnabled. Only databases DB1 abd DB2 will be displayed in the output. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLastGoodCheckDb</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLatchStatistic</command:name><command:noun>DbaLatchStatistic</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays latch statistics from sys.dm_os_latch_stats</maml:para></maml:description></command:details><maml:description><maml:para>This command is based off of Paul Randal's post "Advanced SQL Server performance tuning"</maml:para><maml:para>Returns:</maml:para><maml:para> LatchClass</maml:para><maml:para> WaitSeconds</maml:para><maml:para> WaitCount</maml:para><maml:para> Percentage</maml:para><maml:para> AverageWaitSeconds</maml:para><maml:para> URL</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/advanced-performance-troubleshooting-waits-latches-spinlocks/</maml:para><maml:para> https://www.sqlskills.com/blogs/paul/most-common-latch-classes-and-what-they-mean/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLatchStatistic</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Threshold, in percentage of all latch stats on the system. Default per Paul's post is 95%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Threshold, in percentage of all latch stats on the system. Default per Paul's post is 95%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LatchStatistics, Waits Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLatchStatistic -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check latch statistics for servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLatchStatistic -SqlInstance sql2008 -Threshold 98 </dev:code><dev:remarks><maml:para> Check latch statistics on server sql2008 for thresholds above 98% </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaLatchStatistic -SqlInstance sql2008 -Threshold 100 | Select-Object * | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Collects all latch statistics on server sql2008 into a Data Table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008','sqlserver2012' | Get-DbaLatchStatistic </dev:code><dev:remarks><maml:para> Get latch statistics for servers sql2008 and sqlserver2012 via pipline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaLatchStatistic -SqlInstance sql2008 -SqlCredential $cred Connects using sqladmin credential and returns latch statistics from sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaLatchStatistic -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> PS C:\> $output PS C:\> foreach ($row in ($output | Sort-Object -Unique Url)) { Start-Process ($row).Url } Displays the output then loads the associated sqlskills website for each result. Opens one tab per unique URL. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLatchStatistic</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLinkedServer</command:name><command:noun>DbaLinkedServer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets all linked servers and a summary of information from the linked servers listed.</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves information about each linked server on the instance(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLinkedServer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to process - this list is auto-populated from the server. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLinkedServer</maml:name><maml:description><maml:para>The linked server(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLinkedServer</maml:name><maml:description><maml:para>The linked server(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The linked server(s) to process - this list is auto-populated from the server. If unspecified, all linked servers will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer, Linked Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLinkedServer -SqlInstance DEV01 </dev:code><dev:remarks><maml:para> Returns all linked servers for the SQL Server instance DEV01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance DEV01 -Group SQLDEV | Get-DbaLinkedServer | Out-GridView </dev:code><dev:remarks><maml:para> Returns all linked servers for a group of servers from SQL Server Central Management Server (CMS). Send output to GridView. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLinkedServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLinkedServerLogin</command:name><command:noun>DbaLinkedServerLogin</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Obtains linked server login(s).</maml:para></maml:description></command:details><maml:description><maml:para>Obtains linked server login(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLinkedServerLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s) to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s) to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance and Get-DbaLinkedServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s) to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance and Get-DbaLinkedServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s) to include.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer, Login Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin login1 </dev:code><dev:remarks><maml:para> Gets the linked server login "login1" from the linked server "linkedServer1" on sql01. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -ExcludeLocalLogin login2 </dev:code><dev:remarks><maml:para> Gets the linked server login(s) from the linked server "linkedServer1" on sql01 and excludes the login2 linked server login. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> (Get-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1) | Get-DbaLinkedServerLogin -LocalLogin login1 </dev:code><dev:remarks><maml:para> Gets the linked server login "login1" from the linked server "linkedServer1" on sql01 using a pipeline with the linked server passed in. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> (Connect-DbaInstance -SqlInstance sql01) | Get-DbaLinkedServerLogin -LinkedServer linkedServer1 -LocalLogin login1 </dev:code><dev:remarks><maml:para> Gets the linked server login "login1" from the linked server "linkedServer1" on sql01 using a pipeline with the instance passed in. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLinkedServerLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLocaleSetting</command:name><command:noun>DbaLocaleSetting</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Locale settings on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Locale settings on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLocaleSetting</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, Locale, OS Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLocaleSetting -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the Locale settings on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaLocaleSetting </dev:code><dev:remarks><maml:para> Gets the Locale settings on computers sql1, sql2 and sql3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLocaleSetting -ComputerName sql1,sql2 -Credential $credential </dev:code><dev:remarks><maml:para> Gets the Locale settings on computers sql1 and sql2 using SQL Authentication to authenticate to the servers. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLocaleSetting</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Function to get an SMO login object of the logins for a given SQL Server instance. Takes a server object from the pipeline. SQL Azure DB is not supported.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaLogin function returns an SMO Login object for the logins passed, if there are no users passed it will return all logins.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaLogin</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process - this list is auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFilter</maml:name><maml:description><maml:para>A list of logins to include - accepts wildcard patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFilter</maml:name><maml:description><maml:para>A list of logins to exclude - accepts wildcard patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogin</maml:name><maml:description><maml:para>A Switch to remove System Logins from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Filters logins by their type. Valid options are Windows and SQL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HasAccess</maml:name><maml:description><maml:para>A Switch to return Logins that have access to the instance of SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locked</maml:name><maml:description><maml:para>A Switch to return locked Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>A Switch to return disabled Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MustChangePassword</maml:name><maml:description><maml:para>A Switch to return Logins that need to change password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detailed</maml:name><maml:description><maml:para>A Switch to return additional information available from the LoginProperty function</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detailed</maml:name><maml:description><maml:para>A Switch to return additional information available from the LoginProperty function</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>A Switch to return disabled Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFilter</maml:name><maml:description><maml:para>A list of logins to exclude - accepts wildcard patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemLogin</maml:name><maml:description><maml:para>A Switch to remove System Logins from the output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HasAccess</maml:name><maml:description><maml:para>A Switch to return Logins that have access to the instance of SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFilter</maml:name><maml:description><maml:para>A list of logins to include - accepts wildcard patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locked</maml:name><maml:description><maml:para>A Switch to return locked Logins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process - this list is auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MustChangePassword</maml:name><maml:description><maml:para>A Switch to return Logins that need to change password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Filters logins by their type. Valid options are Windows and SQL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Mitchell Hamann (@SirCaptainMitch) | Rob Sewell (@SQLDBaWithBeard) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets all the logins from server sql2016 using NT authentication and returns the SMO login objects </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -SqlCredential $sqlcred </dev:code><dev:remarks><maml:para> Gets all the logins for a given SQL Server using a passed credential object and returns the SMO login objects </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -SqlCredential $sqlcred -Login dbatoolsuser,TheCaptain </dev:code><dev:remarks><maml:para> Get specific logins from server sql2016 returned as SMO login objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -IncludeFilter '##*','NT *' </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 beginning with '##' or 'NT ', returned as SMO login objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -ExcludeLogin dbatoolsuser </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 except the login dbatoolsuser, returned as SMO login objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -Type Windows </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are Windows Logins </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -Type Windows -IncludeFilter *Rob* </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are Windows Logins and have Rob in the name </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -Type SQL </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are SQL Logins </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -Type SQL -IncludeFilter *Rob* </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are SQL Logins and have Rob in the name </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -ExcludeSystemLogin </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are not system objects </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -ExcludeFilter '##*','NT *' </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 except any beginning with '##' or 'NT ', returned as SMO login objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2016', 'sql2014' | Get-DbaLogin -SqlCredential $sqlcred </dev:code><dev:remarks><maml:para> Using Get-DbaLogin on the pipeline, you can also specify which names you would like with -Login. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 13 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2016', 'sql2014' | Get-DbaLogin -SqlCredential $sqlcred -Locked </dev:code><dev:remarks><maml:para> Using Get-DbaLogin on the pipeline to get all locked logins on servers sql2016 and sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2016', 'sql2014' | Get-DbaLogin -SqlCredential $sqlcred -HasAccess -Disabled </dev:code><dev:remarks><maml:para> Using Get-DbaLogin on the pipeline to get all Disabled logins that have access on servers sql2016 or sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 15 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2016 -Type SQL -Detailed </dev:code><dev:remarks><maml:para> Get all user objects from server sql2016 that are SQL Logins. Get additional info for login available from LoginProperty function </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 16 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2016', 'sql2014' | Get-DbaLogin -SqlCredential $sqlcred -MustChangePassword </dev:code><dev:remarks><maml:para> Using Get-DbaLogin on the pipeline to get all logins that must change password on servers sql2016 and sql2014. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaMaintenanceSolutionLog</command:name><command:noun>DbaMaintenanceSolutionLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Reads the log files generated by the IndexOptimize Agent Job from Ola Hallengren's MaintenanceSolution.</maml:para></maml:description></command:details><maml:description><maml:para>Ola wrote a .sql script to get the content from the commandLog table. However, if LogToTable='N', there will be no logging in that table. This function reads the text files that are written in the SQL Instance's Log directory.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaMaintenanceSolutionLog</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogType</maml:name><maml:description><maml:para>Accepts 'IndexOptimize', 'DatabaseBackup', 'DatabaseIntegrityCheck'. Only IndexOptimize parsing is available at the moment</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Consider only files generated since this date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Where to search for log files. By default it's the SQL instance error log path path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogType</maml:name><maml:description><maml:para>Accepts 'IndexOptimize', 'DatabaseBackup', 'DatabaseIntegrityCheck'. Only IndexOptimize parsing is available at the moment</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Where to search for log files. By default it's the SQL instance error log path path</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Consider only files generated since this date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, OlaHallengren Author: Klaas Vandenberghe (@powerdbaklaas) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://ola.hallengren.com </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sql instance sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -SqlCredential $credential </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sqlserver2014a, using SQL Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sqlserver2014a', 'sqlserver2020test' | Get-DbaMaintenanceSolutionLog </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sqlserver2014a and sqlserver2020test. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -Path 'D:\logs\maintenancesolution\' </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sqlserver2014a, reading the log files in their custom location. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -Since '2017-07-18' </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sqlserver2014a, starting from july 18, 2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaintenanceSolutionLog -SqlInstance sqlserver2014a -LogType IndexOptimize </dev:code><dev:remarks><maml:para> Gets the outcome of the IndexOptimize job on sqlserver2014a, the other options are not yet available! sorry </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaMaintenanceSolutionLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaManagementObject</command:name><command:noun>DbaManagementObject</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Management Object versions installed on the machine.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaManagementObject returns an object with the Version and the</maml:para><maml:para>Add-Type Load Template for each version on the server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaManagementObject</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The name of the Windows Server(s) you would like to check.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command uses Windows credentials. This parameter allows you to connect remotely as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VersionNumber</maml:name><maml:description><maml:para>This is the specific version number you are looking for. The function will look for that version only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The name of the Windows Server(s) you would like to check.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command uses Windows credentials. This parameter allows you to connect remotely as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VersionNumber</maml:name><maml:description><maml:para>This is the specific version number you are looking for. The function will look for that version only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SMO Author: Ben Miller (@DBAduck), dbaduck.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaManagementObject </dev:code><dev:remarks><maml:para> Returns all versions of SMO on the computer </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaManagementObject -VersionNumber 13 </dev:code><dev:remarks><maml:para> Returns just the version specified. If the version does not exist then it will return nothing. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaManagementObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaMaxMemory</command:name><command:noun>DbaMaxMemory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the 'Max Server Memory' configuration setting and the memory of the server. Works on SQL Server 2000-2014.</maml:para></maml:description></command:details><maml:description><maml:para>This command retrieves the SQL Server 'Max Server Memory' configuration setting as well as the total physical installed on the server.</maml:para><maml:para>Results are turned in megabytes (MB).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaMaxMemory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: MaxMemory, Memory Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMaxMemory -SqlInstance sqlcluster, sqlserver2012 </dev:code><dev:remarks><maml:para> Get memory settings for instances "sqlcluster" and "sqlserver2012". Returns results in megabytes (MB). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlcluster | Get-DbaMaxMemory | Where-Object { $_.MaxValue -gt $_.Total } </dev:code><dev:remarks><maml:para> Find all servers in Server Central Management Server that have 'Max Server Memory' set to higher than the total memory of the server (think 2147483647) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Find-DbaInstance -ComputerName localhost | Get-DbaMaxMemory | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Scans localhost for instances using the browser service, traverses all instances and displays memory settings in a formatted table. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaMaxMemory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaMemoryCondition</command:name><command:noun>DbaMemoryCondition</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Determine the memory conditions from SQL Server ring buffers.</maml:para></maml:description></command:details><maml:description><maml:para>The information from SQL Server ring buffers can be used to determine the memory conditions on the server when paging occurs.</maml:para><maml:para>This command is based on a query provided by Microsoft support.</maml:para><maml:para>Reference KB article: https://support.microsoft.com/en-us/help/918483/how-to-reduce-paging-of-buffer-pool-memory-in-the-64-bit-version-of-sq</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaMemoryCondition</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Memory, General Author: IJeb Reitsma Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMemoryCondition -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns the memory conditions for the selected instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a -Group GroupName | Get-DbaMemoryCondition | Out-GridView </dev:code><dev:remarks><maml:para> Returns the memory conditions for a group of servers from SQL Server Central Management Server (CMS). Send output to GridView. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaMemoryCondition</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaMemoryUsage</command:name><command:noun>DbaMemoryUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get amount of memory in use by *all* SQL Server components and instances</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para><maml:para>SSAS and SSIS are included.</maml:para><maml:para>SSRS does not have memory counters, only memory shrinks and memory pressure state.</maml:para><maml:para>This function requires local admin role on the targeted computers.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaMemoryUsage</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The Windows Server that you are connecting to. Note that this will return all instances, but Out-GridView makes it easy to filter to specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The Windows Server that you are connecting to. Note that this will return all instances, but Out-GridView makes it easy to filter to specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, OS, Memory Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT SSIS Counters: https://msdn.microsoft.com/en-us/library/ms137622.aspx </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMemoryUsage -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Returns a custom object displaying Server, counter instance, counter, number of pages, memory </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMemoryUsage -ComputerName sql2017\sqlexpress -SqlCredential sqladmin | Where-Object { $_.Memory.Megabyte -gt 100 } </dev:code><dev:remarks><maml:para> Logs into the sql2017\sqlexpress as sqladmin using SQL Authentication then returns results only where memory exceeds 100 MB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaMemoryUsage | Out-Gridview </dev:code><dev:remarks><maml:para> Gets results from an array of $servers then diplays them in a gridview. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaMemoryUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaModule</command:name><command:noun>DbaModule</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays all objects in sys.sys_modules after specified modification date. Works on SQL Server 2008 and above.</maml:para></maml:description></command:details><maml:description><maml:para>Quickly find modules (Stored Procs, Functions, Views, Constraints, Rules, Triggers, etc) that have been modified in a database, or across all databases.</maml:para><maml:para>Results will exclude the module definition, but can be queried explicitly.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaModule</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModifiedSince</maml:name><maml:description><maml:para>DateTime value to use as minimum modified date of module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Limit by specific type of module. Valid choices include: View, TableValuedFunction, DefaultConstraint, StoredProcedure, Rule, InlineTableValuedFunction, Trigger, ScalarFunction</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabases</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObjects</maml:name><maml:description><maml:para>Allows you to suppress output on system objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabases</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObjects</maml:name><maml:description><maml:para>Allows you to suppress output on system objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModifiedSince</maml:name><maml:description><maml:para>DateTime value to use as minimum modified date of module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Limit by specific type of module. Valid choices include: View, TableValuedFunction, DefaultConstraint, StoredProcedure, Rule, InlineTableValuedFunction, Trigger, ScalarFunction</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Object, StoredProcedure, View, Table, Trigger Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaModule -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Return all modules for servers sql2008 and sqlserver2012 sorted by Database, Modify_Date ASC. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaModule -SqlInstance sql2008, sqlserver2012 | Select-Object * </dev:code><dev:remarks><maml:para> Shows hidden definition column (informative wall of text). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaModule -SqlInstance sql2008 -Database TestDB -ModifiedSince "2017-01-01 10:00:00" </dev:code><dev:remarks><maml:para> Return all modules on server sql2008 for only the TestDB database with a modified date after 1 January 2017 10:00:00 AM. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaModule -SqlInstance sql2008 -Type View, Trigger, ScalarFunction </dev:code><dev:remarks><maml:para> Return all modules on server sql2008 for all databases that are triggers, views or scalar functions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008' | Get-DbaModule -Database TestDB -Type View, StoredProcedure, ScalarFunction </dev:code><dev:remarks><maml:para> Return all modules on server sql2008 for only the TestDB database that are stored procedures, views or scalar functions. Input via Pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2008 -ExcludeSystem | Get-DbaModule -Type View, Trigger, ScalarFunction </dev:code><dev:remarks><maml:para> Return all modules on server sql2008 for all user databases that are triggers, views or scalar functions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2008, sqlserver2012 -ExcludeUser | Get-DbaModule -Type StoredProcedure -ExcludeSystemObjects </dev:code><dev:remarks><maml:para> Return all user created stored procedures in the system databases for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaModule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaMsdtc</command:name><command:noun>DbaMsdtc</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays information about the Distributed Transaction Coordinator (MSDTC) on a server</maml:para></maml:description></command:details><maml:description><maml:para>Returns a custom object with Computer name, state of the MSDTC Service, security settings of MSDTC and CID's</maml:para><maml:para>Requires: Windows administrator access on Servers</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaMsdtc</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternative credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternative credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Msdtc, dtc, General Author: Klaas Vandenberghe (@powerdbaklaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMsdtc -ComputerName srv0042 </dev:code><dev:remarks><maml:para> Get DTC status for the server srv0042 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Computers = (Get-Content D:\configfiles\SQL\MySQLInstances.txt | % {$_.split('\')[0]}) </dev:code><dev:remarks><maml:para> PS C:\> $Computers | Get-DbaMsdtc Get DTC status for all the computers in a .txt file </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMsdtc -Computername $Computers | Where-Object { $_.dtcservicestate -ne 'running' } </dev:code><dev:remarks><maml:para> Get DTC status for all the computers where the MSDTC Service is not running </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaMsdtc -ComputerName srv0042 | Out-Gridview </dev:code><dev:remarks><maml:para> Get DTC status for the computer srv0042 and show in a grid view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaMsdtc</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaNetworkActivity</command:name><command:noun>DbaNetworkActivity</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Current traffic on every Network Interface on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Current traffic on every Network Interface on a computer.</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/aa394293(v=vs.85).aspx</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaNetworkActivity</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Server, Management, Network Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkActivity -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the Current traffic on every Network Interface on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaNetworkActivity </dev:code><dev:remarks><maml:para> Gets the Current traffic on every Network Interface on computers sql1, sql2 and sql3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkActivity -ComputerName sql1,sql2 </dev:code><dev:remarks><maml:para> Gets the Current traffic on every Network Interface on computers sql1 and sql2. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaNetworkActivity</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaNetworkCertificate</command:name><command:noun>DbaNetworkCertificate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the computer certificate enabled for the SQL Server instance's network encryption.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the computer certificates that is assigned to the SQL Server instance for enabling network encryption.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaNetworkCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to standard instance on localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to standard instance on localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Encryption, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkCertificate -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets computer certificate for the standard instance on sql2016 that is being used for SQL Server network encryption </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkCertificate -SqlInstance server1\sql2017 </dev:code><dev:remarks><maml:para> Gets computer certificate for the named instance sql2017 on server1 that is being used for SQL Server network encryption </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaNetworkCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaNetworkConfiguration</command:name><command:noun>DbaNetworkConfiguration</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the network configuration of a SQL Server instance as shown in SQL Server Configuration Manager.</maml:para></maml:description></command:details><maml:description><maml:para>Returns a PowerShell object with the network configuration of a SQL Server instance as shown in SQL Server Configuration Manager.</maml:para><maml:para>As we get information from SQL WMI and also from the registry, we use PS Remoting to run the core code on the target machine.</maml:para><maml:para>For a detailed explanation of the different properties see the documentation at:</maml:para><maml:para>https://docs.microsoft.com/en-us/sql/tools/configuration-manager/sql-server-network-configuration</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaNetworkConfiguration</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputType</maml:name><maml:description><maml:para>Defines what information is returned from the command. Options include: Full, ServerProtocols, TcpIpProperties, TcpIpAddresses or Certificate. Full by default. Full returns one object per SqlInstance with information about the server protocols and nested objects with information about TCP/IP properties and TCP/IP addresses. It also outputs advanced properties including information about the used certificate. ServerProtocols returns one object per SqlInstance with information about the server protocols only. TcpIpProperties returns one object per SqlInstance with information about the TCP/IP protocol properties only. TcpIpAddresses returns one object per SqlInstance and IP address. If the instance listens on all IP addresses (TcpIpProperties.ListenAll), only the information about the IPAll address is returned. Otherwise only information about the individual IP addresses is returned. For more details see: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port Certificate returns one object per SqlInstance with information about the configured network certificate and whether encryption is enforced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputType</maml:name><maml:description><maml:para>Defines what information is returned from the command. Options include: Full, ServerProtocols, TcpIpProperties, TcpIpAddresses or Certificate. Full by default. Full returns one object per SqlInstance with information about the server protocols and nested objects with information about TCP/IP properties and TCP/IP addresses. It also outputs advanced properties including information about the used certificate. ServerProtocols returns one object per SqlInstance with information about the server protocols only. TcpIpProperties returns one object per SqlInstance with information about the TCP/IP protocol properties only. TcpIpAddresses returns one object per SqlInstance and IP address. If the instance listens on all IP addresses (TcpIpProperties.ListenAll), only the information about the IPAll address is returned. Otherwise only information about the individual IP addresses is returned. For more details see: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port Certificate returns one object per SqlInstance with information about the configured network certificate and whether encryption is enforced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection, SQLWMI Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkConfiguration -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns the network configuration for the default instance on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaNetworkConfiguration -SqlInstance winserver\sqlexpress, sql2016 -OutputType ServerProtocols </dev:code><dev:remarks><maml:para> Returns information about the server protocols for the sqlexpress on winserver and the default instance on sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaNetworkConfiguration</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaOleDbProvider</command:name><command:noun>DbaOleDbProvider</command:noun><command:verb>Get</command:verb><maml:description><maml:para>This command gets a list of all ole db providers available on a server.</maml:para></maml:description></command:details><maml:description><maml:para>This command gets a list of all ole db providers available on a server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaOleDbProvider</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>The name of the ole db provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>The name of the ole db provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, OLEDB Author: Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOleDbProvider -SqlInstance SqlBox1\Instance2 </dev:code><dev:remarks><maml:para> Returns a list of all OleDb providers on SqlBox1\Instance2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOleDbProvider -SqlInstance SqlBox1\Instance2 -Provider SSISOLEDB </dev:code><dev:remarks><maml:para> Returns the SSISOLEDB provider on SqlBox1\Instance2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaOleDbProvider</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaOpenTransaction</command:name><command:noun>DbaOpenTransaction</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays all open transactions.</maml:para></maml:description></command:details><maml:description><maml:para>This command is based on open transaction script published by Paul Randal.</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/script-open-transactions-with-text-and-plans/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaOpenTransaction</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Process, Session, ActivityMonitor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOpenTransaction -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns open transactions for sqlserver2014a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOpenTransaction -SqlInstance sqlserver2014a -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Logs into sqlserver2014a using the login "sqladmin" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaOpenTransaction</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaOperatingSystem</command:name><command:noun>DbaOperatingSystem</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets operating system information from the server.</maml:para></maml:description></command:details><maml:description><maml:para>Gets operating system information from the server and returns as an object.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaOperatingSystem</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer(s). If no computer name is specified, the local computer is targeted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Alternate credential object to use for accessing the target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, OS, OperatingSystem Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOperatingSystem </dev:code><dev:remarks><maml:para> Returns information about the local computer's operating system </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaOperatingSystem -ComputerName sql2016 </dev:code><dev:remarks><maml:para> Returns information about the sql2016's operating system </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\> 'sql2016', 'sql2017' | Get-DbaOperatingSystem -Credential $wincred Returns information about the sql2016 and sql2017 operating systems using alternative Windows credentials </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Content .\servers.txt | Get-DbaOperatingSystem </dev:code><dev:remarks><maml:para> Returns 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaOperatingSystem</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPageFileSetting</command:name><command:noun>DbaPageFileSetting</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns information on the page file configuration of the target computer.</maml:para></maml:description></command:details><maml:description><maml:para>This command uses CIM (or other, related computer management tools) to detect the page file configuration of the target computer(s).</maml:para><maml:para>Note that this may require local administrator privileges for the relevant computers.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPageFileSetting</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be the name of a computer, a SMO object, an IP address, an AD Computer object, a connection string or a SQL Instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be the name of a computer, a SMO object, an IP address, an AD Computer object, a connection string or a SQL Instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, OS, PageFile Author: Klaas Vandenberghe (@PowerDBAKlaas) dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPageFileSetting -ComputerName ServerA,ServerB </dev:code><dev:remarks><maml:para> Returns a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA and ServerB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'ServerA' | Get-DbaPageFileSetting </dev:code><dev:remarks><maml:para> Returns a custom object displaying ComputerName, AutoPageFile, FileName, Status, LastModified, LastAccessed, AllocatedBaseSize, InitialSize, MaximumSize, PeakUsage, CurrentUsage for ServerA </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPageFileSetting</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmCategory</command:name><command:noun>DbaPbmCategory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns policy categories from policy based management from an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns policy categories from policy based management from an instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmCategory</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filters results to only show specific condition</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObject</maml:name><maml:description><maml:para>By default system objects are include. Use this parameter to exclude them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filters results to only show specific condition</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObject</maml:name><maml:description><maml:para>By default system objects are include. Use this parameter to exclude them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCategory -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns all policy categories from the sql2016 PBM server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCategory -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return all policy categories from the sql2016 PBM server </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmCategorySubscription</command:name><command:noun>DbaPbmCategorySubscription</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns policy category subscriptions from policy based management from an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns policy category subscriptions from policy based management from an instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmCategorySubscription</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCategorySubscription -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns all policy category subscriptions from the sql2016 PBM server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCategorySubscription -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return all policy category subscriptions from the sql2016 PBM server </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmCategorySubscription</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmCondition</command:name><command:noun>DbaPbmCondition</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns conditions from policy based management from an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns conditions from policy based management from an instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmCondition</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Condition</maml:name><maml:description><maml:para>Filters results to only show specific condition</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Condition</maml:name><maml:description><maml:para>Filters results to only show specific condition</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCondition -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns all conditions from the sql2016 PBM server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmCondition -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return all conditions from the sql2016 PBM server </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmCondition</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmObjectSet</command:name><command:noun>DbaPbmObjectSet</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns object sets from policy based management.</maml:para></maml:description></command:details><maml:description><maml:para>Returns object sets from policy based management.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmObjectSet</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectSet</maml:name><maml:description><maml:para>Filters results to only show specific object set</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to include them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectSet</maml:name><maml:description><maml:para>Filters results to only show specific object set</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmObjectSet -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns all object sets from the sql2016 PBM instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmObjectSet -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return all object sets from the sql2016 PBM instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmObjectSet</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmPolicy</command:name><command:noun>DbaPbmPolicy</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns policies from Policy-Based Management from an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Returns details of policies with the option to filter on Category and SystemObjects.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmPolicy</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Policy</maml:name><maml:description><maml:para>Filters results to only show specific policy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filters results to only show policies in the category selected</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to INCLUDE them .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>Filters results to only show policies in the category selected</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObject</maml:name><maml:description><maml:para>By default system objects are filtered out. Use this parameter to INCLUDE them .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaPbmStore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Dmf.PolicyStore[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Dmf.PolicyStore[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Policy</maml:name><maml:description><maml:para>Filters results to only show specific policy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmPolicy -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Returns all policies from sql2016 server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmPolicy -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return all policies from sql2016 instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmPolicy -SqlInstance sql2016 -Category MorningCheck </dev:code><dev:remarks><maml:para> Returns all policies from sql2016 server that part of the PolicyCategory MorningCheck </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmPolicy</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPbmStore</command:name><command:noun>DbaPbmStore</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the policy based management store.</maml:para></maml:description></command:details><maml:description><maml:para>Returns the policy based management store.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPbmStore</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Policy, PolicyBasedManagement, PBM Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmStore -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Return the policy store from the sql2016 instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPbmStore -SqlInstance sql2016 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Uses a credential $cred to connect and return the policy store from the sql2016 instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPbmStore</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPermission</command:name><command:noun>DbaPermission</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get a list of Server and Database level permissions</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves a list of permissions</maml:para><maml:para>Permissions link principals to securables.</maml:para><maml:para>Principals exist on Windows, Instance and Database level.</maml:para><maml:para>Securables exist on Instance and Database level.</maml:para><maml:para>A permission state can be GRANT, DENY or REVOKE.</maml:para><maml:para>The permission type can be SELECT, CONNECT, EXECUTE and more.</maml:para><maml:para>The CONTROL permission is also returned for dbo users, db_owners, and schema owners.</maml:para><maml:para>To see server-level implicit permissions via fixed roles run the following command: Get-DbaServerRole -SqlInstance serverName | Select-Object *</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/ms191291.aspx for more information</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPermission</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeServerLevel</maml:name><maml:description><maml:para>If this switch is enabled, information about Server Level Permissions will be output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObjects</maml:name><maml:description><maml:para>If this switch is enabled, permissions on system securables will be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more database(s) to exclude from processing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemObjects</maml:name><maml:description><maml:para>If this switch is enabled, permissions on system securables will be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeServerLevel</maml:name><maml:description><maml:para>If this switch is enabled, information about Server Level Permissions will be output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Permissions, Instance, Database, Security Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPermission -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns a custom object with Server name, Database name, permission state, permission type, grantee and securable. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPermission -SqlInstance ServerA\sql987 | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Returns a formatted table displaying Server, Database, permission state, permission type, grantee, granteetype, securable and securabletype. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPermission -SqlInstance ServerA\sql987 -ExcludeSystemObjects -IncludeServerLevel </dev:code><dev:remarks><maml:para> Returns a custom object with Server name, Database name, permission state, permission type, grantee and securable in all databases and on the server level, but not on system securables. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPermission -SqlInstance sql2016 -Database master </dev:code><dev:remarks><maml:para> Returns a custom object with permissions for the master database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPermission</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfAvailableCounter</command:name><command:noun>DbaPfAvailableCounter</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gathers list of all available counters on local or remote machines.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Thanks to Daniel Streefkerk for this super fast way of counters</maml:para><maml:para>https://daniel.streefkerkonline.com/2016/02/18/use-powershell-to-list-all-windows-performance-counters-and-their-numeric-ids</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfAvailableCounter</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfAvailableCounter </dev:code><dev:remarks><maml:para> Gets all available counters on the local machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfAvailableCounter -Pattern *sql* </dev:code><dev:remarks><maml:para> Gets all counters matching sql on the local machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfAvailableCounter -ComputerName sql2017 -Pattern *sql* </dev:code><dev:remarks><maml:para> Gets all counters matching sql on the remote server sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfAvailableCounter -Pattern *sql* </dev:code><dev:remarks><maml:para> Gets all counters matching sql on the local machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfAvailableCounter -Pattern *sql* | Add-DbaPfDataCollectorCounter -CollectorSet 'Test Collector Set' -Collector DataCollector01 </dev:code><dev:remarks><maml:para> Adds all counters matching "sql" to the DataCollector01 within the 'Test Collector Set' CollectorSet. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfAvailableCounter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfDataCollector</command:name><command:noun>DbaPfDataCollector</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Performance Monitor Data Collectors.</maml:para></maml:description></command:details><maml:description><maml:para>Gets Performance Monitor Data Collectors.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfDataCollector</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollector </dev:code><dev:remarks><maml:para> Gets all Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollector -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Gets all Collectors on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollector -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Gets all Collectors for the 'System Correlation' CollectorSet on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Get-DbaPfDataCollector </dev:code><dev:remarks><maml:para> Gets all Collectors for the 'System Correlation' CollectorSet. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfDataCollector</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfDataCollectorCounter</command:name><command:noun>DbaPfDataCollectorCounter</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Performance Counters.</maml:para></maml:description></command:details><maml:description><maml:para>Gets Performance Counters.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfDataCollectorCounter</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name to capture. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name to capture. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter </dev:code><dev:remarks><maml:para> Gets all counters for all Collector Sets on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Gets all counters for all Collector Sets on on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter -ComputerName sql2017 -Counter '\Processor(_Total)\% Processor Time' </dev:code><dev:remarks><maml:para> Gets the '\Processor(_Total)\% Processor Time' counter on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Gets all counters for the 'System Correlation' CollectorSet on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Get-DbaPfDataCollector | Get-DbaPfDataCollectorCounter </dev:code><dev:remarks><maml:para> Gets all counters for the 'System Correlation' CollectorSet. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfDataCollectorCounter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfDataCollectorCounterSample</command:name><command:noun>DbaPfDataCollectorCounterSample</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Performance Counter Samples.</maml:para></maml:description></command:details><maml:description><maml:para>Gets Performance Counter Samples.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfDataCollectorCounterSample</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continuous</maml:name><maml:description><maml:para>If this switch is enabled, samples will be retrieved continuously until you press CTRL+C. By default, this command gets only one counter sample. You can use the SampleInterval parameter to set the interval for continuous sampling.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ListSet</maml:name><maml:description><maml:para>Gets the specified performance counter sets on the computers. Enter the names of the counter sets. Wildcards are permitted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.SwitchParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSamples</maml:name><maml:description><maml:para>Specifies the number of samples to get from each counter. The default is 1 sample. To get samples continuously (no maximum sample size), use the Continuous parameter. To collect a very large data set, consider running a Get-DbaPfDataCollectorCounterSample command as a Windows PowerShell background job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleInterval</maml:name><maml:description><maml:para>Specifies the time between samples in seconds. The minimum value and the default value are 1 second.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorCounter via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The Collector name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector Set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continuous</maml:name><maml:description><maml:para>If this switch is enabled, samples will be retrieved continuously until you press CTRL+C. By default, this command gets only one counter sample. You can use the SampleInterval parameter to set the interval for continuous sampling.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The Counter name. This must be in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorCounter via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ListSet</maml:name><maml:description><maml:para>Gets the specified performance counter sets on the computers. Enter the names of the counter sets. Wildcards are permitted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.SwitchParameter[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.SwitchParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSamples</maml:name><maml:description><maml:para>Specifies the number of samples to get from each counter. The default is 1 sample. To get samples continuously (no maximum sample size), use the Continuous parameter. To collect a very large data set, consider running a Get-DbaPfDataCollectorCounterSample command as a Windows PowerShell background job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleInterval</maml:name><maml:description><maml:para>Specifies the time between samples in seconds. The minimum value and the default value are 1 second.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounterSample </dev:code><dev:remarks><maml:para> Gets a single sample for all counters for all Collector Sets on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounterSample -Counter '\Processor(_Total)\% Processor Time' </dev:code><dev:remarks><maml:para> Gets a single sample for all counters for all Collector Sets on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter -ComputerName sql2017, sql2016 | Out-GridView -PassThru | Get-DbaPfDataCollectorCounterSample -MaxSamples 10 </dev:code><dev:remarks><maml:para> Gets 10 samples for all counters for all Collector Sets for servers sql2016 and sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounterSample -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Gets a single sample for all counters for all Collector Sets on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounterSample -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Gets a single sample for all counters for the 'System Correlation' CollectorSet on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounterSample -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Gets a single sample for all counters for the 'System Correlation' CollectorSet. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfDataCollectorCounterSample</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfDataCollectorSet</command:name><command:noun>DbaPfDataCollectorSet</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Performance Monitor Data Collector Set.</maml:para></maml:description></command:details><maml:description><maml:para>Gets Performance Monitor Data Collector Set.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfDataCollectorSet</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The Collector set name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Gets all Collector Sets on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Gets all Collector Sets on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -ComputerName sql2017 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Gets the 'System Correlation' CollectorSet on sql2017 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet | Select-Object * </dev:code><dev:remarks><maml:para> Displays extra columns and also exposes the original COM object in DataCollectorSetObject. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfDataCollectorSet</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPfDataCollectorSetTemplate</command:name><command:noun>DbaPfDataCollectorSetTemplate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Parses Perf Monitor templates. Defaults to parsing templates in the dbatools template repository (\bin\perfmontemplates\).</maml:para></maml:description></command:details><maml:description><maml:para>Parses Perf Monitor XML templates. Defaults to parsing templates in the dbatools template repository (\bin\perfmontemplates\).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPfDataCollectorSetTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (\bin\perfmontemplates\).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering. Alternatively, you can use Out-GridView -Passthru to select objects and pipe them to Import-DbaPfDataCollectorSetTemplate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies one or more of the templates provided by dbatools. Press tab to cycle through the list to the options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (\bin\perfmontemplates\).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering. Alternatively, you can use Out-GridView -Passthru to select objects and pipe them to Import-DbaPfDataCollectorSetTemplate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies one or more of the templates provided by dbatools. Press tab to cycle through the list to the options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSetTemplate </dev:code><dev:remarks><maml:para> Returns information about all the templates in the local dbatools repository. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 | Start-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Allows you to select a template, then deploys it to sql2017 and immediately starts the DataCollectorSet. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSetTemplate | Select-Object * </dev:code><dev:remarks><maml:para> Returns more information about the template, including the full path/filename. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPfDataCollectorSetTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPlanCache</command:name><command:noun>DbaPlanCache</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Provides information about adhoc and prepared plan cache usage</maml:para></maml:description></command:details><maml:description><maml:para>Checks adhoc and prepared plan cache for each database, if over 100 MB you should consider using Remove-DbaQueryPlan to clear the plan caches or turning on "optimize for adhoc workloads" configuration if running 2008 or later.</maml:para><maml:para>References: https://www.sqlskills.com/blogs/kimberly/plan-cache-adhoc-workloads-and-clearing-the-single-use-plan-cache-bloat/</maml:para><maml:para>Note: This command returns results from all SQL server instances on the destination server but the process column is specific to -SqlInstance passed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPlanCache</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Cache, Memory Author: Tracy Boggiano, databasesuperhero.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPlanCache -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns the single use plan cache usage information for SQL Server instance 2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPlanCache -SqlInstance sql2017 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Returns the single use plan cache usage information for SQL Server instance 2017 using login 'sqladmin' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPlanCache</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPowerPlan</command:name><command:noun>DbaPowerPlan</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Power Plan settings for compliance with best practices, which recommend High Performance for SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Power Plan settings on a computer against best practices recommendations.</maml:para><maml:para>To display all available Power Plans on a computer, use the parameter List.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPowerPlan</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check Power Plan settings on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>List</maml:name><maml:description><maml:para>Return all available Power Plans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check Power Plan settings on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>List</maml:name><maml:description><maml:para>Return all available Power Plans.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PowerPlan, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPowerPlan -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Gets the Power Plan settings for sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPowerPlan -ComputerName sql2017 -Credential ad\admin </dev:code><dev:remarks><maml:para> Gets the Power Plan settings for sql2017 using an alternative credential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPowerPlan -ComputerName sql2017 -List </dev:code><dev:remarks><maml:para> Gets all available Power Plans on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPowerPlan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaPrivilege</command:name><command:noun>DbaPrivilege</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the users with local privileges on one or more computers.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the users with local privileges 'Lock Pages in Memory', 'Instant File Initialization', 'Logon as Batch', 'Generate Security Audits' or 'Logon as a service' on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaPrivilege</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Privilege, OS, Security Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPrivilege -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the local privileges on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaPrivilege </dev:code><dev:remarks><maml:para> Gets the local privileges on computers sql1, sql2 and sql3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPrivilege -ComputerName sql1,sql2 | Out-GridView </dev:code><dev:remarks><maml:para> Gets the local privileges on computers sql1 and sql2, and shows them in a grid view. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaPrivilege</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaProcess</command:name><command:noun>DbaProcess</command:noun><command:verb>Get</command:verb><maml:description><maml:para>This command displays SQL Server processes.</maml:para></maml:description></command:details><maml:description><maml:para>This command displays processes associated with a spid, login, host, program or database.</maml:para><maml:para>Thanks 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaProcess</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more process IDs (Spid) to be displayed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one ore more process IDs to exclude from display. Options for this parameter are auto-populated from the server. This is the last filter to run, so even if a Spid matches another filter, it will be excluded by this filter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more Login names with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more hostnames with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more program names with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemSpids</maml:name><maml:description><maml:para>If this switch is enabled, system Spids will be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one ore more process IDs to exclude from display. Options for this parameter are auto-populated from the server. This is the last filter to run, so even if a Spid matches another filter, it will be excluded by this filter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemSpids</maml:name><maml:description><maml:para>If this switch is enabled, system Spids will be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more hostnames with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more Login names with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more program names with active processes to look for. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more process IDs (Spid) to be displayed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Process, Session, ActivityMonitor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProcess -SqlInstance sqlserver2014a -Login base\ctrlb, sa </dev:code><dev:remarks><maml:para> Shows information about the processes for base\ctrlb and sa on sqlserver2014a. Windows Authentication is used in connecting to sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProcess -SqlInstance sqlserver2014a -SqlCredential $credential -Spid 56, 77 </dev:code><dev:remarks><maml:para> Shows information about the processes for spid 56 and 57. Uses alternative (SQL or Windows) credentials to authenticate to sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProcess -SqlInstance sqlserver2014a -Program 'Microsoft SQL Server Management Studio' </dev:code><dev:remarks><maml:para> Shows information about the processes that were created in Microsoft SQL Server Management Studio. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProcess -SqlInstance sqlserver2014a -Host workstationx, server100 </dev:code><dev:remarks><maml:para> Shows information about the processes that were initiated by hosts (computers/clients) workstationx and server 1000. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaProcess</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaProductKey</command:name><command:noun>DbaProductKey</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets SQL Server Product Keys from local or destination SQL Servers.</maml:para></maml:description></command:details><maml:description><maml:para>This command find the product key for all installed instances. Clustered instances are supported as well.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaProductKey</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>This command logs into the SQL instance to gather additional information. Use this parameter to connect to the discovered SQL instances using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target Windows instance using alternative credentials. Windows Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target Windows instance using alternative credentials. Windows Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>This command logs into the SQL instance to gather additional information. Use this parameter to connect to the discovered SQL instances using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ProductKey, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProductKey -ComputerName winxp, sqlservera, sqlserver2014a, win2k8 </dev:code><dev:remarks><maml:para> Gets SQL Server versions, editions and product keys for all instances within each server or workstation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaProductKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaQueryExecutionTime</command:name><command:noun>DbaQueryExecutionTime</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays Stored Procedures and Ad hoc queries with the highest execution times. Works on SQL Server 2008 and above.</maml:para></maml:description></command:details><maml:description><maml:para>Quickly find slow query executions within a database. Results will include stored procedures and individual SQL statements.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaQueryExecutionTime</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxResultsPerDb</maml:name><maml:description><maml:para>Allows you to limit the number of results returned, as many systems can have very large amounts of query plans. Default value is 100 results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinExecs</maml:name><maml:description><maml:para>Allows you to limit the scope to queries that have been executed a minimum number of time. Default value is 100 executions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinExecMs</maml:name><maml:description><maml:para>Allows you to limit the scope to queries with a specified average execution time. Default value is 500 (ms).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxResultsPerDb</maml:name><maml:description><maml:para>Allows you to limit the number of results returned, as many systems can have very large amounts of query plans. Default value is 100 results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinExecMs</maml:name><maml:description><maml:para>Allows you to limit the scope to queries with a specified average execution time. Default value is 500 (ms).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinExecs</maml:name><maml:description><maml:para>Allows you to limit the scope to queries that have been executed a minimum number of time. Default value is 100 executions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Performance, Query Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaQueryExecutionTime -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Return the top 100 slowest stored procedures or statements for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaQueryExecutionTime -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Return the top 100 slowest stored procedures or statements on server sql2008 for only the TestDB database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaQueryExecutionTime -SqlInstance sql2008 -Database TestDB -MaxResultsPerDb 100 -MinExecs 200 -MinExecMs 1000 </dev:code><dev:remarks><maml:para> Return 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 1000ms or higher. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaQueryExecutionTime</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRandomizedDataset</command:name><command:noun>DbaRandomizedDataset</command:noun><command:verb>Get</command:verb><maml:description><maml:para>This function will generate a random data set based on a template</maml:para></maml:description></command:details><maml:description><maml:para>Generates a random value based on a template.</maml:para><maml:para>The templates standardized in the templates folder and can be used to generate a data set.</maml:para><maml:para>There is also an option to point to a specific template</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRandomizedDataset</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>The name of the template to use. It will go through the default templates to see if it's present</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TemplateFile</maml:name><maml:description><maml:para>File to use as a template</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rows</maml:name><maml:description><maml:para>Amount of rows to generate. Th default is 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking. The default is 'en'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped input from Get-DbaRandomizedDatasetTemplate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped input from Get-DbaRandomizedDatasetTemplate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking. The default is 'en'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rows</maml:name><maml:description><maml:para>Amount of rows to generate. Th default is 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>The name of the template to use. It will go through the default templates to see if it's present</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TemplateFile</maml:name><maml:description><maml:para>File to use as a template</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDataset -Template Personaldata </dev:code><dev:remarks><maml:para> Generate a data set based on the default template PersonalData. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDataset -Template Personaldata -Rows 10 </dev:code><dev:remarks><maml:para> Generate a data set based on the default template PersonalData with 10 rows </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDataset -TemplateFile C:\Dataset\FinancialData.json </dev:code><dev:remarks><maml:para> Generates data set based on a template file in another directory </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDataset -Template Personaldata, FinancialData </dev:code><dev:remarks><maml:para> Generates multiple data sets </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDatasetTemplate -Template PersonalData | Get-DbaRandomizedDataset </dev:code><dev:remarks><maml:para> Pipe the templates from Get-DbaRandomizedDatasetTemplate to Get-DbaRandomizedDataset and generate the data set </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRandomizedDataset</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRandomizedDatasetTemplate</command:name><command:noun>DbaRandomizedDatasetTemplate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the dataset templates</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves the templates from the default directory and if assigned custom directories</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRandomizedDatasetTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>The name of the template to use. It will go through the default templates to see if it's present</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path or paths that contain template files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefault</maml:name><maml:description><maml:para>Exclude the default templates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefault</maml:name><maml:description><maml:para>Exclude the default templates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path or paths that contain template files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>The name of the template to use. It will go through the default templates to see if it's present</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDatasetTemplate </dev:code><dev:remarks><maml:para> Get the templates from the default directory </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDatasetTemplate -Template Personaldata, Test </dev:code><dev:remarks><maml:para> Get the templates from thedefault directory and filter on PersonalData and Test </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedDatasetTemplate -Path C:\DatasetTemplates </dev:code><dev:remarks><maml:para> Get the templates from a custom directory </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRandomizedDatasetTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRandomizedType</command:name><command:noun>DbaRandomizedType</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get the randomized types and sub types</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves the types and sub types available</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRandomizedType</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizedType</maml:name><maml:description><maml:para>Filter the randomized types</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizedSubType</maml:name><maml:description><maml:para>Filter the randomized sub types</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Get the types and sub types based on a pattern</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Get the types and sub types based on a pattern</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizedSubType</maml:name><maml:description><maml:para>Filter the randomized sub types</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizedType</maml:name><maml:description><maml:para>Filter the randomized types</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedType </dev:code><dev:remarks><maml:para> Get all the types and subtypes </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedType -Pattern "Addr" </dev:code><dev:remarks><maml:para> Find all the types and sub types based on a pattern </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedType -RandomizedType Person </dev:code><dev:remarks><maml:para> Find all the sub types for Person </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedType -RandomizedSubType LastName </dev:code><dev:remarks><maml:para> Get all the types and subtypes that known by "LastName" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRandomizedType</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRandomizedValue</command:name><command:noun>DbaRandomizedValue</command:noun><command:verb>Get</command:verb><maml:description><maml:para>This function will generate a random value for a specific data type or bogus type and subtype</maml:para></maml:description></command:details><maml:description><maml:para>Generates a random value based on the assigned sql data type or bogus type with sub type.</maml:para><maml:para>It supports a wide range of sql data types and an entire dictionary of various random values.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRandomizedValue</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataType</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Supported data types are bigint, bit, bool, char, date, datetime, datetime2, decimal, int, float, guid, money, numeric, nchar, ntext, nvarchar, real, smalldatetime, smallint, text, time, tinyint, uniqueidentifier, userdefineddatatype, varchar</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizerType</maml:name><maml:description><maml:para>Bogus type to use. Supported types are Address, Commerce, Company, Database, Date, Finance, Hacker, Hashids, Image, Internet, Lorem, Name, Person, Phone, Random, Rant, System</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizerSubType</maml:name><maml:description><maml:para>Subtype to use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Min</maml:name><maml:description><maml:para>Minimum value used to generate certain lengths of values. Default is 1</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Max</maml:name><maml:description><maml:para>Maximum value used to generate certain lengths of values. Default is 255</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Precision</maml:name><maml:description><maml:para>Precision used for numeric sql data types like decimal, numeric, real and float</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Format</maml:name><maml:description><maml:para>Use specilized formatting with certain randomizer types like phone number.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Symbol</maml:name><maml:description><maml:para>Use a symbol in front of the value i.e. $100,12</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Separator</maml:name><maml:description><maml:para>Some masking types support separators</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>This is the value that needs to be used for several possible transformations. One example is the subtype "Shuffling" where the value will be shuffled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking. The default is 'en'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataType</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Supported data types are bigint, bit, bool, char, date, datetime, datetime2, decimal, int, float, guid, money, numeric, nchar, ntext, nvarchar, real, smalldatetime, smallint, text, time, tinyint, uniqueidentifier, userdefineddatatype, varchar</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Format</maml:name><maml:description><maml:para>Use specilized formatting with certain randomizer types like phone number.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking. The default is 'en'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Max</maml:name><maml:description><maml:para>Maximum value used to generate certain lengths of values. Default is 255</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Min</maml:name><maml:description><maml:para>Minimum value used to generate certain lengths of values. Default is 1</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Precision</maml:name><maml:description><maml:para>Precision used for numeric sql data types like decimal, numeric, real and float</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizerSubType</maml:name><maml:description><maml:para>Subtype to use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RandomizerType</maml:name><maml:description><maml:para>Bogus type to use. Supported types are Address, Commerce, Company, Database, Date, Finance, Hacker, Hashids, Image, Internet, Lorem, Name, Person, Phone, Random, Rant, System</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Separator</maml:name><maml:description><maml:para>Some masking types support separators</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Symbol</maml:name><maml:description><maml:para>Use a symbol in front of the value i.e. $100,12</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>This is the value that needs to be used for several possible transformations. One example is the subtype "Shuffling" where the value will be shuffled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataMasking, DataGeneration Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedValue -DataType bit </dev:code><dev:remarks><maml:para> Will return either a 1 or 0 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedValue -DataType int </dev:code><dev:remarks><maml:para> Will generate a number between -2147483648 and 2147483647 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedValue -RandomizerSubType Zipcode </dev:code><dev:remarks><maml:para> Generates a random zipcode </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedValue -RandomizerSubType Zipcode -Format "#### ##" </dev:code><dev:remarks><maml:para> Generates a random zipcode like "1234 56" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRandomizedValue -RandomizerSubType PhoneNumber -Format "(###) #######" </dev:code><dev:remarks><maml:para> Generates a random phonenumber like "(123) 4567890" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRandomizedValue</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRegistryRoot</command:name><command:noun>DbaRegistryRoot</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer</maml:para></maml:description></command:details><maml:description><maml:para>Uses SQL WMI to find the Registry Root of each SQL Server instance on a computer</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRegistryRoot</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. This is not a SQL Server service, though if you pass a named SQL instance, it'll parse properly down to the computer name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. This is not a SQL Server service, though if you pass a named SQL instance, it'll parse properly down to the computer name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Management, OS, Registry Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegistryRoot </dev:code><dev:remarks><maml:para> Gets the registry root for all instances on localhost </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegistryRoot -ComputerName server1 </dev:code><dev:remarks><maml:para> Gets the registry root for all instances on server1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRegistryRoot</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets list of SQL Server objects stored in local registered groups, azure data studio and central management server.</maml:para></maml:description></command:details><maml:description><maml:para>Gets list of SQL Server objects stored in local registered groups, azure data studio and central management server.</maml:para><maml:para>Local Registered Servers and Azure Data Studio support alternative authentication (excluding MFA) but Central Management Studio does not.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRegServer</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more names to include. Name is the visible name in SSMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more server names to include. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more Central Management Server groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Get server by Id(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSelf</maml:name><maml:description><maml:para>If this switch is enabled and you're connecting to a Central Management Server, the CMS server itself will be included in the results, along with all other Registered Servers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResolveNetworkName</maml:name><maml:description><maml:para>If this switch is enabled, the NetBIOS name and IP address(es) of each server will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeLocal</maml:name><maml:description><maml:para>Include local registered servers or Azure Data Studio registered servers in results when specifying SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more Central Management Server groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Get server by Id(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeLocal</maml:name><maml:description><maml:para>Include local registered servers or Azure Data Studio registered servers in results when specifying SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSelf</maml:name><maml:description><maml:para>If this switch is enabled and you're connecting to a Central Management Server, the CMS server itself will be included in the results, along with all other Registered Servers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more names to include. Name is the visible name in SSMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResolveNetworkName</maml:name><maml:description><maml:para>If this switch is enabled, the NetBIOS name and IP address(es) of each server will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more server names to include. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Bryan Hamby (@galador) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer </dev:code><dev:remarks><maml:para> Gets a list of servers from the local registered servers and azure data studio </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Gets a list of servers from the CMS on sqlserver2014a, using Windows Credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a -IncludeSelf </dev:code><dev:remarks><maml:para> Gets a list of servers from the CMS on sqlserver2014a and includes sqlserver2014a in the output results. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a -SqlCredential $credential | Select-Object -Unique -ExpandProperty ServerName </dev:code><dev:remarks><maml:para> Returns only the server names from the CMS on sqlserver2014a, using SQL Authentication to authenticate to the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a -Group HR, Accounting </dev:code><dev:remarks><maml:para> Gets a list of servers in the HR and Accounting groups from the CMS on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a -Group HR\Development </dev:code><dev:remarks><maml:para> Returns a list of servers in the HR and sub-group Development from the CMS on sqlserver2014a. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRegServerGroup</command:name><command:noun>DbaRegServerGroup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets list of Server Groups objects stored in SQL Server Central Management Server (CMS).</maml:para></maml:description></command:details><maml:description><maml:para>Returns an array of Server Groups found in the CMS.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRegServerGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more Central Management Server groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Get group by Id(s). This parameter only works if the group has a registered server in it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeGroup</maml:name><maml:description><maml:para>Specifies one or more Central Management Server groups to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>Get group by Id(s). This parameter only works if the group has a registered server in it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Tony Wilhelm (@tonywsql) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the top level groups from the CMS on sqlserver2014a, using Windows Credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -SqlCredential $credential </dev:code><dev:remarks><maml:para> Gets the top level groups from the CMS on sqlserver2014a, using alternative credentials to authenticate to the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -Group HR, Accounting </dev:code><dev:remarks><maml:para> Gets the HR and Accounting groups from the CMS on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -Group HR\Development </dev:code><dev:remarks><maml:para> Returns the sub-group Development of the HR group from the CMS on sqlserver2014a. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRegServerGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRegServerStore</command:name><command:noun>DbaRegServerStore</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a SQL Server Registered Server Store Object</maml:para></maml:description></command:details><maml:description><maml:para>Returns a SQL Server Registered Server Store object - useful for working with Central Management Store</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRegServerStore</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer,CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerStore -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns a SQL Server Registered Server Store Object from sqlserver2014a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerStore -SqlInstance sqlserver2014a -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Returns a SQL Server Registered Server Store Object from sqlserver2014a by logging in with the sqladmin login </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRegServerStore</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRepDistributor</command:name><command:noun>DbaRepDistributor</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the information about a replication distributor for a given SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>This function locates and enumerates distributor information for a given SQL Server instance.</maml:para><maml:para>All replication commands need SQL Server Management Studio installed and are therefore currently not supported.</maml:para><maml:para>Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRepDistributor</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Replication Author: William Durkin (@sql_williamd) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepDistributor -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Retrieve distributor information for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRepDistributor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRepPublication</command:name><command:noun>DbaRepPublication</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays all publications for a server or database.</maml:para></maml:description></command:details><maml:description><maml:para>Quickly find all transactional, merge, and snapshot publications on a specific server or database.</maml:para><maml:para>All replication commands need SQL Server Management Studio installed and are therefore currently not supported.</maml:para><maml:para>Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRepPublication</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublicationType</maml:name><maml:description><maml:para>Limit by specific type of publication. Valid choices include: Transactional, Merge, Snapshot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>byng this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>byng this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublicationType</maml:name><maml:description><maml:para>Limit by specific type of publication. Valid choices include: Transactional, Merge, Snapshot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Replication Author: Colin Douglas Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepPublication -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Return all publications for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepPublication -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Return all publications on server sql2008 for only the TestDB database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepPublication -SqlInstance sql2008 -PublicationType Transactional </dev:code><dev:remarks><maml:para> Return all publications on server sql2008 for all databases that have Transactional publications </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRepPublication</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRepServer</command:name><command:noun>DbaRepServer</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets a replication server object</maml:para></maml:description></command:details><maml:description><maml:para>Gets a replication server object</maml:para><maml:para>All replication commands need SQL Server Management Studio installed and are therefore currently not supported.</maml:para><maml:para>Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRepServer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Replication Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepServer -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets the replication server object for sql2016 using Windows authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRepServer -SqlInstance sql2016 -SqlCredential repadmin </dev:code><dev:remarks><maml:para> Gets the replication server object for sql2016 using SQL authentication </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRepServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaResourceGovernor</command:name><command:noun>DbaResourceGovernor</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Resource Governor object</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Resource Governor object</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaResourceGovernor</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourceGovernor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaResourceGovernor -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets the resource governor object of the SqlInstance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaResourceGovernor </dev:code><dev:remarks><maml:para> Gets the resource governor object on Sql1 and Sql2/sqlexpress instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaResourceGovernor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRgClassifierFunction</command:name><command:noun>DbaRgClassifierFunction</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the Resource Governor custom classifier Function</maml:para></maml:description></command:details><maml:description><maml:para>Gets the Resource Governor custom classifier Function which is used for customize the workload groups usage</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRgClassifierFunction</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaResourceGovernor</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaResourceGovernor</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, ResourceGovernor Author: Alessandro Alpi (@suxstellino), alessandroalpi.blog Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgClassifierFunction -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets the classifier function from sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaResourceGovernor | Get-DbaRgClassifierFunction </dev:code><dev:remarks><maml:para> Gets the classifier function object on Sql1 and Sql2/sqlexpress instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRgClassifierFunction</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRgResourcePool</command:name><command:noun>DbaRgResourcePool</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Resource Governor Pool objects, including internal or external</maml:para></maml:description></command:details><maml:description><maml:para>Gets Resource Governor Pool objects, including internal or external</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRgResourcePool</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaResourceGovernor</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaResourceGovernor</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourceGovernor[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourceGovernor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgResourcePool -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets the internal resource pools on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaResourceGovernor | Get-DbaRgResourcePool </dev:code><dev:remarks><maml:para> Gets the internal resource pools on Sql1 and Sql2/sqlexpress instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Get-DbaResourceGovernor | Get-DbaRgResourcePool -Type External </dev:code><dev:remarks><maml:para> Gets the external resource pools on Sql1 and Sql2/sqlexpress instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRgResourcePool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRgWorkloadGroup</command:name><command:noun>DbaRgWorkloadGroup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets all Resource Governor workload group objects</maml:para></maml:description></command:details><maml:description><maml:para>Gets all Resource Governor workload group objects</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRgWorkloadGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourcePool[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourcePool[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ResourcePool[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ResourcePool[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourceGovernor Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgWorkloadGroup -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Gets the workload groups on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaResourceGovernor -SqlInstance sql2017 | Get-DbaRgResourcePool | Get-DbaRgWorkloadGroup </dev:code><dev:remarks><maml:para> Gets the workload groups on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRgWorkloadGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaRunningJob</command:name><command:noun>DbaRunningJob</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns all non-idle Agent jobs running on the server</maml:para></maml:description></command:details><maml:description><maml:para>This function returns agent jobs that active on the SQL Server instance when calling the command</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaRunningJob</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRunningJob -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Returns any active jobs on sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2017, sql2019 | Get-DbaRunningJob </dev:code><dev:remarks><maml:para> Returns all active jobs on multiple instances piped into the function. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaRunningJob </dev:code><dev:remarks><maml:para> Returns all active jobs on multiple instances piped into the function. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaRunningJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSchemaChangeHistory</command:name><command:noun>DbaSchemaChangeHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets DDL changes logged in the system trace.</maml:para></maml:description></command:details><maml:description><maml:para>Queries the default system trace for any DDL changes in the specified time frame</maml:para><maml:para>Only works with SQL 2005 and later, as the system trace didn't exist before then</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSchemaChangeHistory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>A date from which DDL changes should be returned. Default is to start at the beginning of the current trace file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Dbadatetime</command:parameterValue><dev:type><maml:name>Dbadatetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The name of a SQL Server object you want to look for changes on</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The name of a SQL Server object you want to look for changes on</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>A date from which DDL changes should be returned. Default is to start at the beginning of the current trace file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Dbadatetime</command:parameterValue><dev:type><maml:name>Dbadatetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace, Changes, Database, Utility Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSchemaChangeHistory -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all DDL changes made in all databases on the SQL Server instance localhost since the system trace began </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSchemaChangeHistory -SqlInstance localhost -Since (Get-Date).AddDays(-7) </dev:code><dev:remarks><maml:para> Returns all DDL changes made in all databases on the SQL Server instance localhost in the last 7 days </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSchemaChangeHistory -SqlInstance localhost -Database Finance, Prod -Since (Get-Date).AddDays(-7) </dev:code><dev:remarks><maml:para> Returns all DDL changes made in the Prod and Finance databases on the SQL Server instance localhost in the last 7 days </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSchemaChangeHistory -SqlInstance localhost -Database Finance -Object AccountsTable -Since (Get-Date).AddDays(-7) </dev:code><dev:remarks><maml:para> Returns all DDL changes made to the AccountsTable object in the Finance database on the SQL Server instance localhost in the last 7 days </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSchemaChangeHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaServerRole</command:name><command:noun>DbaServerRole</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the list of server-level roles.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the list of server-level roles for SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaServerRole</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role to filter results to that role only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>Server-Level role to exclude from results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. Only applies to SQL Server 2017 that supports creation of server-level roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. Only applies to SQL Server 2017 that supports creation of server-level roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>Server-Level role to exclude from results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role to filter results to that role only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role Author: Shawn Melton (@wsmelton) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRole -SqlInstance sql2016a </dev:code><dev:remarks><maml:para> Outputs list of server-level roles for sql2016a instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRole -SqlInstance sql2017a -ExcludeFixedRole </dev:code><dev:remarks><maml:para> Outputs the server-level role(s) that are not fixed roles on sql2017a instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaServerRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaServerRoleMember</command:name><command:noun>DbaServerRoleMember</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get members of server roles for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaServerRoleMember returns connected SMO object for server roles for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaServerRoleMember</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. Only applies to SQL Server 2017 that supports creation of server-level roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFixedRole</maml:name><maml:description><maml:para>Filter the fixed server-level roles. Only applies to SQL Server 2017 that supports creation of server-level roles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeServerRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, Login Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all members of all server roles on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all members of all server roles on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaServerRoleMember Returns all members of all server roles for every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance localhost -ServerRole 'sysadmin', 'dbcreator' </dev:code><dev:remarks><maml:para> Returns all members of the sysadmin or dbcreator roles on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance localhost -ExcludeServerRole 'sysadmin' </dev:code><dev:remarks><maml:para> Returns all members of server-level roles other than sysadmin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance sql2017a -ExcludeFixedRole </dev:code><dev:remarks><maml:para> Returns all members of server-level role(s) that are not fixed roles on sql2017a instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaServerRoleMember -SqlInstance localhost -Login 'MyFriendlyDeveloper' </dev:code><dev:remarks><maml:para> Returns all server-level role(s) for the MyFriendlyDeveloper login on localhost. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaServerRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaService</command:name><command:noun>DbaService</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets the SQL Server related services on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Gets the SQL Server related services on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaService</maml:name><command:parameter required="false" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only returns services that belong to the specific instances on all target computers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent", "Browser", "Engine", "FullText", "SSAS", "SSIS", "SSRS", "PolyBase", "Launchpad"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedProperties</maml:name><maml:description><maml:para>Collect additional properties from the SqlServiceAdvancedProperty Namespace This collects information about Version, Service Pack Level", SkuName, Clustered status and the Cluster Service Name This adds additional overhead to the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaService</maml:name><command:parameter required="false" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceName</maml:name><maml:description><maml:para>Can be used to specify service names explicitly, without looking for service types/instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedProperties</maml:name><maml:description><maml:para>Collect additional properties from the SqlServiceAdvancedProperty Namespace This collects information about Version, Service Pack Level", SkuName, Clustered status and the Cluster Service Name This adds additional overhead to the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdvancedProperties</maml:name><maml:description><maml:para>Collect additional properties from the SqlServiceAdvancedProperty Namespace This collects information about Version, Service Pack Level", SkuName, Clustered status and the Cluster Service Name This adds additional overhead to the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only returns services that belong to the specific instances on all target computers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceName</maml:name><maml:description><maml:para>Can be used to specify service names explicitly, without looking for service types/instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent", "Browser", "Engine", "FullText", "SSAS", "SSIS", "SSRS", "PolyBase", "Launchpad"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, SqlServer, Instance, Connect Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Gets the SQL Server related services on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Get-DbaService -AdvancedProperties </dev:code><dev:remarks><maml:para> Gets the SQL Server related services on computers sql1, sql2 and sql3. Includes Advanced Properties from the SqlServiceAdvancedProperty Namespace </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential WindowsUser </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaService -ComputerName sql1,sql2 -Credential $cred | Out-GridView Gets the SQL Server related services on computers sql1 and sql2 via the user WindowsUser, and shows them in a grid view. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService -ComputerName sql1,sql2 -InstanceName MSSQLSERVER </dev:code><dev:remarks><maml:para> Gets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService -SqlInstance sql1, sql1\test, sql2\test </dev:code><dev:remarks><maml:para> Gets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1, the named instances test on sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService -ComputerName $MyServers -Type SSRS </dev:code><dev:remarks><maml:para> Gets the SQL Server related services of type "SSRS" (Reporting Services) on computers in the variable MyServers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $MyServers = Get-Content .\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaService -ComputerName $MyServers -ServiceName MSSQLSERVER,SQLSERVERAGENT Gets 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $services = Get-DbaService -ComputerName sql1 -Type Agent,Engine </dev:code><dev:remarks><maml:para> PS C:\> $services.ChangeStartMode('Manual') Gets the SQL Server related services of types Sql Agent and DB Engine on computer sql1 and changes their startup mode to 'Manual'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> (Get-DbaService -ComputerName sql1 -Type Engine).Restart($true) </dev:code><dev:remarks><maml:para> Calls a Restart method for each Engine service on computer sql1. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaService</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSpConfigure</command:name><command:noun>DbaSpConfigure</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns all server level system configuration (sys.configuration/sp_configure) information</maml:para></maml:description></command:details><maml:description><maml:para>This function returns server level system configuration (sys.configuration/sp_configure) information. The information is gathered through SMO Configuration.Properties.</maml:para><maml:para>The data includes the default value for each configuration, for quick identification of values that may have been changed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSpConfigure</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Return only specific configurations. Name can be either values from (sys.configuration/sp_configure) or from SMO object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>Exclude specific configurations. Name can be either values from (sys.configuration/sp_configure) or from SMO object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>Exclude specific configurations. Name can be either values from (sys.configuration/sp_configure) or from SMO object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Return only specific configurations. Name can be either values from (sys.configuration/sp_configure) or from SMO object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>A DbaInstanceParameter representing an array of SQL Server instances.</maml:name><maml:uri /><maml:description /></dev:type></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Returns PSCustomObject with properties ServerName, ComputerName, InstanceName, SqlInstance, Name, DisplayName, Description, IsAdvanced, IsDynamic, MinValue, MaxValue, ConfiguredValue, RunningValue, DefaultValue, IsRunningDefaultValue</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SpConfig, Configure, Configuration Author: Nic Cain, sirsql.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpConfigure -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all system configuration information on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'localhost','localhost\namedinstance' | Get-DbaSpConfigure </dev:code><dev:remarks><maml:para> Returns system configuration information on multiple instances piped into the function </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpConfigure -SqlInstance sql2012 -Name 'max server memory (MB)' </dev:code><dev:remarks><maml:para> Returns only the system configuration for MaxServerMemory on sql2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpConfigure -SqlInstance sql2012 -ExcludeName 'max server memory (MB)', RemoteAccess | Out-GridView </dev:code><dev:remarks><maml:para> Returns system configuration information on sql2012 but excludes for max server memory (MB) and remote access. Values returned in grid view </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential SqlCredential </dev:code><dev:remarks><maml:para> PS C:\> 'sql2012' | Get-DbaSpConfigure -SqlCredential $cred -Name RemoteAccess, 'max server memory (MB)' -ExcludeName 'remote access' | Out-GridView Returns system configuration information on sql2012 using SQL Server Authentication. Only MaxServerMemory is returned as RemoteAccess was also excluded. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSpConfigure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSpinLockStatistic</command:name><command:noun>DbaSpinLockStatistic</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays information from sys.dm_os_spinlock_stats. Works on SQL Server 2008 and above.</maml:para></maml:description></command:details><maml:description><maml:para>This command is based off of Paul Randal's post "Advanced SQL Server performance tuning"</maml:para><maml:para>Returns:</maml:para><maml:para> SpinLockName</maml:para><maml:para> Collisions</maml:para><maml:para> Spins</maml:para><maml:para> SpinsPerCollision</maml:para><maml:para> SleepTime</maml:para><maml:para> Backoffs</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/advanced-performance-troubleshooting-waits-latches-spinlocks/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSpinLockStatistic</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, SpinLockStatistics, Waits Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpinLockStatistic -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Get SpinLock Statistics for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaSpinLockStatistic -SqlInstance sql2008 | Select-Object * | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Collects all SpinLock Statistics on server sql2008 into a Data Table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql2008','sqlserver2012' | Get-DbaSpinLockStatistic </dev:code><dev:remarks><maml:para> Get SpinLock Statistics for servers sql2008 and sqlserver2012 via pipline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaSpinLockStatistic -SqlInstance sql2008 -SqlCredential $cred Connects using sqladmin credential and returns SpinLock Statistics from sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSpinLockStatistic</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSpn</command:name><command:noun>DbaSpn</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns a list of set service principal names for a given computer/AD account</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para><maml:para>a given active directory account. You can query one, or both. You'll get a list of every SPN found for either search term.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSpn</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The servers you want to return set SPNs for. This is defaulted automatically to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccountName</maml:name><maml:description><maml:para>The accounts you want to retrieve set SPNs for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>User credential to connect to the remote servers or active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccountName</maml:name><maml:description><maml:para>The accounts you want to retrieve set SPNs for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The servers you want to return set SPNs for. This is defaulted automatically to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>User credential to connect to the remote servers or active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN Author: Drew Furgiuele (@pittfurg), port1433.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpn -ComputerName SQLSERVERA -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Returns a custom object with SearchTerm (ServerName) and the SPNs that were found </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpn -AccountName domain\account -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Returns a custom object with SearchTerm (domain account) and the SPNs that were found </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpn -ComputerName SQLSERVERA,SQLSERVERB -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Returns a custom object with SearchTerm (ServerName) and the SPNs that were found for multiple computers </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSpn</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSsisExecutionHistory</command:name><command:noun>DbaSsisExecutionHistory</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Retrieves SSIS project and package execution History, and environments from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves SSIS project and package execution History, and environments from one SQL Server to another.</maml:para><maml:para>This command gets execution history for SSIS execution given one or more instances and can be filtered by Project, Environment,Folder or Status.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSsisExecutionHistory</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Specifies a filter by status (created,running,cancelled,failed,pending,halted,succeeded,stopping,completed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Project</maml:name><maml:description><maml:para>Specifies a filter by project</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Specifies a filter by folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Environment</maml:name><maml:description><maml:para>Specifies a filter by environment</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Environment</maml:name><maml:description><maml:para>Specifies a filter by environment</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Specifies a filter by folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Project</maml:name><maml:description><maml:para>Specifies a filter by project</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>Datetime object used to narrow the results to a date</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Status</maml:name><maml:description><maml:para>Specifies a filter by status (created,running,cancelled,failed,pending,halted,succeeded,stopping,completed)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, SSIS Author: Chris Tucker (@ChrisTuc47368095) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Folder SMTQ_PRC </dev:code><dev:remarks><maml:para> Get all history items for SMTQ01 in folder SMTQ_PRC. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Status Failed,Cancelled </dev:code><dev:remarks><maml:para> Gets all failed or canceled executions for SMTQ01. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSsisExecutionHistory -SqlInstance SMTQ01,SMTQ02 -Status Failed,Cancelled </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed and would return the SQL statement that would be executed per instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSsisExecutionHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaStartupParameter</command:name><command:noun>DbaStartupParameter</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays values for a detailed list of SQL Server Startup Parameters.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>This command relies on remote Windows Server (SQL WMI/WinRm) access. You can pass alternative Windows credentials by using the -Credential parameter.</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/ms190737.aspx for more information.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaStartupParameter</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternate Windows credentials. $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>If this switch is enabled, simplified output will be produced including only Server, Master Data path, Master Log path, ErrorLog, TraceFlags and ParameterString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled, exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternate Windows credentials. $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>If this switch is enabled, exceptions will be thrown to the caller, which will need to perform its own exception processing. Otherwise, the function will try to catch the exception, interpret it and provide a friendly error message.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>If this switch is enabled, simplified output will be produced including only Server, Master Data path, Master Log path, ErrorLog, TraceFlags and ParameterString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSMan, SQLWMI, Memory, Startup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaStartupParameter -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> Logs into SQL WMI as the current user then displays the values for numerous startup parameters. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaStartupParameter -SqlInstance sql2014 -Credential $wincred -Simple Logs in to WMI using the ad\sqladmin credential and gathers simplified information about the SQL Server Startup Parameters. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaStartupParameter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaStartupProcedure</command:name><command:noun>DbaStartupProcedure</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get-DbaStartupProcedure gets startup procedures (user defined procedures within master database) from a SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>By default, this command returns for each SQL Server instance passed in, the SMO StoredProcedure object for all procedures in the master database that are marked as a startup procedure.</maml:para><maml:para>Can be filtered to check only specific procedures</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaStartupProcedure</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>Use this filter to check if specific procedure(s) are set as startup procedures.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupProcedure</maml:name><maml:description><maml:para>Use this filter to check if specific procedure(s) are set as startup procedures.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Procedure, Startup, StartupProcedure Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaStartupProcedure -SqlInstance SqlBox1\Instance2 </dev:code><dev:remarks><maml:para> Returns an object with all startup procedures for the Instance2 instance on SqlBox1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaStartupProcedure -SqlInstance SqlBox1\Instance2 -StartupProcedure 'dbo.StartupProc' </dev:code><dev:remarks><maml:para> Returns an object with a startup procedure named 'dbo.StartupProc' for the Instance2 instance on SqlBox1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Get-DbaStartupProcedure </dev:code><dev:remarks><maml:para> Returns an object with all startup procedures for every server listed in the Central Management Server on sql2014 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaStartupProcedure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaSuspectPage</command:name><command:noun>DbaSuspectPage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns data that is stored in SQL for Suspect Pages on the specified SQL Server Instance</maml:para></maml:description></command:details><maml:description><maml:para>This function returns any records that were stored due to suspect pages in databases on a SQL Server Instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSuspectPage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to return. If unspecified, all records will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to return. If unspecified, all records will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Pages, DBCC Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSuspectPage -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Retrieve any records stored for Suspect Pages on the sql2016 SQL Server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSuspectPage -SqlInstance sql2016 -Database Test </dev:code><dev:remarks><maml:para> Retrieve any records stored for Suspect Pages on the sql2016 SQL Server and the Test database only. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSuspectPage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaTcpPort</command:name><command:noun>DbaTcpPort</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the TCP port used by the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>By default, this function returns just the TCP port used by the specified SQL Server.</maml:para><maml:para>If -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.</maml:para><maml:para>Remote sqlwmi is used by default. If this doesn't work, then remoting is used. If neither work, it defaults to T-SQL which can provide only the port.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaTcpPort</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to connect to servers using alternate Windows credentials $scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>If this switch is enabled, an object with server name, IPAddress (ipv4 and ipv6), port and static ($true/$false) for one or more SQL Servers is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIpv6</maml:name><maml:description><maml:para>If this switch is enabled, IPv6 information is excluded from All output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>If this switch is enabled, an object with server name, IPAddress (ipv4 and ipv6), port and static ($true/$false) for one or more SQL Servers is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIpv6</maml:name><maml:description><maml:para>If this switch is enabled, IPv6 information is excluded from All output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to connect to servers using alternate Windows credentials $scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, TCP, SQLWMI Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTcpPort -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns just the port number for the default instance on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTcpPort -SqlInstance winserver\sqlexpress, sql2016 </dev:code><dev:remarks><maml:para> Returns an object with server name and port number for the sqlexpress on winserver and the default instance on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTcpPort -SqlInstance sqlserver2014a, sql2016 -All </dev:code><dev:remarks><maml:para> Returns an object with server name, IPAddress (ipv4 and ipv6), port and static ($true/$false) for sqlserver2014a and sql2016. Remote sqlwmi is used by default. If this doesn't work, then remoting is used. If neither work, it defaults to T-SQL which can provide only the port. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Get-DbaTcpPort -ExcludeIpv6 -All </dev:code><dev:remarks><maml:para> Returns an object with server name, IPAddress (just ipv4), port and static ($true/$false) for every server listed in the Central Management Server on sql2014. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaTcpPort</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaTempdbUsage</command:name><command:noun>DbaTempdbUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Tempdb usage for running queries.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaTempdbUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Tempdb Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTempdbUsage -SqlInstance localhost\SQLDEV2K14 </dev:code><dev:remarks><maml:para> Gets tempdb usage for localhost\SQLDEV2K14 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaTempdbUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsChangeLog</command:name><command:noun>DbatoolsChangeLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Opens the link to our online change log</maml:para></maml:description></command:details><maml:description><maml:para>Opens the link to our online change log. To see the local changelog instead, use the Local parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsChangeLog</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Local</maml:name><maml:description><maml:para>Return the local change log to the console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Local</maml:name><maml:description><maml:para>Return the local change log to the console</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, ChangeLog Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsChangeLog </dev:code><dev:remarks><maml:para> Opens a browser to our online changelog </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsChangeLog -Local </dev:code><dev:remarks><maml:para> Returns the content from changelog.md </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsChangeLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Retrieves configuration elements by name.</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves configuration elements by name.</maml:para><maml:para>Can be used to search the existing configuration list.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsConfig</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>Default: "*" Search for configurations using the full name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides the default behavior and also displays hidden configuration values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbatoolsConfig</maml:name><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Default: "*" The name of the configuration element(s) to retrieve. May be any string, supports wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>Default: "*" Search configuration by module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides the default behavior and also displays hidden configuration values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Overrides the default behavior and also displays hidden configuration values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>Default: "*" Search for configurations using the full name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>Default: "*" Search configuration by module.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Default: "*" The name of the configuration element(s) to retrieve. May be any string, supports wildcards.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig 'Mail.To' </dev:code><dev:remarks><maml:para> Retrieves the configuration element for the key "Mail.To" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig -Force </dev:code><dev:remarks><maml:para> Retrieve all configuration elements from all modules, even hidden ones. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsConfigValue</command:name><command:noun>DbatoolsConfigValue</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the configuration value stored under the specified name.</maml:para></maml:description></command:details><maml:description><maml:para>Returns the configuration value stored under the specified name.</maml:para><maml:para>It requires the full name (<Module>.<Name>) and is usually only called by functions.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsConfigValue</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name (<Module>.<Name>) of the configured value to return.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Fallback</maml:name><maml:description><maml:para>A fallback value to use, if no value was registered to a specific configuration element. This basically is a default value that only applies on a "per call" basis, rather than a system-wide default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotNull</maml:name><maml:description><maml:para>By default, this function returns null if one tries to retrieve the value from either a Configuration that does not exist or a Configuration whose value was set to null. However, sometimes it may be important that some value was returned. By specifying this parameter, the function will throw an error if no value was found at all.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Fallback</maml:name><maml:description><maml:para>A fallback value to use, if no value was registered to a specific configuration element. This basically is a default value that only applies on a "per call" basis, rather than a system-wide default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name (<Module>.<Name>) of the configured value to return.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotNull</maml:name><maml:description><maml:para>By default, this function returns null if one tries to retrieve the value from either a Configuration that does not exist or a Configuration whose value was set to null. However, sometimes it may be important that some value was returned. By specifying this parameter, the function will throw an error if no value was found at all.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfigValue -Name 'System.MailServer' </dev:code><dev:remarks><maml:para> Returns the configured value that was assigned to the key 'System.MailServer' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfigValue -Name 'Default.CoffeeMilk' -Fallback 0 </dev:code><dev:remarks><maml:para> Returns the configured value for 'Default.CoffeeMilk'. If no such value is configured, it returns '0' instead. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsConfigValue</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsError</command:name><command:noun>DbatoolsError</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns detailed dbatools-related error information</maml:para></maml:description></command:details><maml:description><maml:para>Returns detailed dbatools-related error information</maml:para><maml:para>By default, it only returns the most recent error ($error[0])</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsError</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>First</maml:name><maml:description><maml:para>Works like `Select-Object -First 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Works like `Select-Object -Last 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>Works like `Select-Object -Skip 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>Returns detailed information for all dbatools-related errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>Returns detailed information for all dbatools-related errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>First</maml:name><maml:description><maml:para>Works like `Select-Object -First 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Works like `Select-Object -Last 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>Works like `Select-Object -Skip 1`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Support Author: Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsError </dev:code><dev:remarks><maml:para> Returns detailed error information for the most recent dbatools error </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsError -All </dev:code><dev:remarks><maml:para> Returns detailed error information for all dbatools-related errors </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsError -Last 1 </dev:code><dev:remarks><maml:para> Returns the oldest dbatools-related error in the pipeline </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsLog</command:name><command:noun>DbatoolsLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns log entries for dbatools</maml:para></maml:description></command:details><maml:description><maml:para>Returns log entries for dbatools. Handy when debugging or developing a script using it.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsLog</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FunctionName</maml:name><maml:description><maml:para>Default: "*" Only messages written by similar functions will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Default: "*" Only messages written by commands from similar modules will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only messages handling the specified target will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tag</maml:name><maml:description><maml:para>Only messages containing one of these tags will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Only messages written by the last X executions will be returned. Uses Get-History to determine execution. Ignores Get-message commands. By default, this will also include messages from other runspaces. If your command executes in parallel, that's useful. If it doesn't and you were offloading executions to other runspaces, consider also filtering by runspace using '-Runspace'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastError</maml:name><maml:description><maml:para>Only retrieves the last error message type written.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>How many executions to skip when specifying '-Last'. Has no effect without the '-Last' parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Runspace</maml:name><maml:description><maml:para>The guid of the runspace to return messages from. By default, messages from all runspaces are returned. Run the following line to see the list of guids: Get-Runspace | ft Id, Name, InstanceId -AutoSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Guid</command:parameterValue><dev:type><maml:name>Guid</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Level</maml:name><maml:description><maml:para>Limit the message selection by level. Message levels have a numeric value, making it easier to select a range: -Level (1..6) Will select the first 6 levels (Critical - SomewhatVerbose).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Message.MessageLevel[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Message.MessageLevel[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>By default, messages such as SQL statements are flattened. Use raw to see the output without flattened formatting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Errors</maml:name><maml:description><maml:para>Instead of log entries, the error entries will be retrieved</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Errors</maml:name><maml:description><maml:para>Instead of log entries, the error entries will be retrieved</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FunctionName</maml:name><maml:description><maml:para>Default: "*" Only messages written by similar functions will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>Only messages written by the last X executions will be returned. Uses Get-History to determine execution. Ignores Get-message commands. By default, this will also include messages from other runspaces. If your command executes in parallel, that's useful. If it doesn't and you were offloading executions to other runspaces, consider also filtering by runspace using '-Runspace'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastError</maml:name><maml:description><maml:para>Only retrieves the last error message type written.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Level</maml:name><maml:description><maml:para>Limit the message selection by level. Message levels have a numeric value, making it easier to select a range: -Level (1..6) Will select the first 6 levels (Critical - SomewhatVerbose).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Message.MessageLevel[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Message.MessageLevel[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Default: "*" Only messages written by commands from similar modules will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>By default, messages such as SQL statements are flattened. Use raw to see the output without flattened formatting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Runspace</maml:name><maml:description><maml:para>The guid of the runspace to return messages from. By default, messages from all runspaces are returned. Run the following line to see the list of guids: Get-Runspace | ft Id, Name, InstanceId -AutoSize</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Guid</command:parameterValue><dev:type><maml:name>Guid</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Skip</maml:name><maml:description><maml:para>How many executions to skip when specifying '-Last'. Has no effect without the '-Last' parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tag</maml:name><maml:description><maml:para>Only messages containing one of these tags will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only messages handling the specified target will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Support Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsLog </dev:code><dev:remarks><maml:para> Returns all log entries currently in memory. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatooolsLog -LastError </dev:code><dev:remarks><maml:para> Returns the last log entry type of error. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsLog -Target "a" -Last 1 -Skip 1 </dev:code><dev:remarks><maml:para> Returns all log entries that targeted the object "a" in the second last execution sent. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsLog -Tag "fail" -Last 5 </dev:code><dev:remarks><maml:para> Returns all log entries within the last 5 executions that contained the tag "fail" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbatoolsPath</command:name><command:noun>DbatoolsPath</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Access a configured path.</maml:para></maml:description></command:details><maml:description><maml:para>Access a configured path.</maml:para><maml:para>Paths can be configured using Set-DbatoolsPath or using the configuration system.</maml:para><maml:para>To register a path using the configuration system create a setting key named like this:</maml:para><maml:para>"Path.Managed.<PathName>"</maml:para><maml:para>For example the following setting points at the temp path:</maml:para><maml:para>"Path.Managed.Temp"</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbatoolsPath</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the path to retrieve.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the path to retrieve.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsPath -Name 'temp' </dev:code><dev:remarks><maml:para> Returns the temp path. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbatoolsPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaTopResourceUsage</command:name><command:noun>DbaTopResourceUsage</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the top 20 resource consumers for cached queries based on four different metrics: duration, frequency, IO, and CPU.</maml:para></maml:description></command:details><maml:description><maml:para>Returns the top 20 resource consumers for cached queries based on four different metrics: duration, frequency, IO, and CPU.</maml:para><maml:para>This command is based off of queries provided by Michael J. Swart at http://michaeljswart.com/go/Top20</maml:para><maml:para>Per Michael: "I've 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."</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaTopResourceUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>By default, all Types run but you can specify one or more of the following: Duration, Frequency, IO, or CPU</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Limit</maml:name><maml:description><maml:para>By default, these query the Top 20 worst offenders (though more than 20 results can be returned if each of the top 20 have more than 1 subsequent result)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>This will exclude system objects like replication procedures from being returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>This will exclude system objects like replication procedures from being returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Limit</maml:name><maml:description><maml:para>By default, these query the Top 20 worst offenders (though more than 20 results can be returned if each of the top 20 have more than 1 subsequent result)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>By default, all Types run but you can specify one or more of the following: Duration, Frequency, IO, or CPU</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Performance, Query Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTopResourceUsage -SqlInstance sql2008, sql2012 </dev:code><dev:remarks><maml:para> Return the 80 (20 x 4 types) top usage results by duration, frequency, IO, and CPU servers for servers sql2008 and sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTopResourceUsage -SqlInstance sql2008 -Type Duration, Frequency -Database TestDB </dev:code><dev:remarks><maml:para> Return the highest usage by duration (top 20) and frequency (top 20) for the TestDB on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTopResourceUsage -SqlInstance sql2016 -Limit 30 </dev:code><dev:remarks><maml:para> Return the highest usage by duration (top 30) and frequency (top 30) for the TestDB on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTopResourceUsage -SqlInstance sql2008, sql2012 -ExcludeSystem </dev:code><dev:remarks><maml:para> Return 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTopResourceUsage -SqlInstance sql2016| Select-Object * </dev:code><dev:remarks><maml:para> Return all the columns plus the QueryPlan column </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaTopResourceUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaTrace</command:name><command:noun>DbaTrace</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets a list of trace(s) from specified SQL Server Instance</maml:para></maml:description></command:details><maml:description><maml:para>This function returns a list of traces on a SQL Server instance and identifies the default trace file</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaTrace</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>The id(s) of the Trace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Switch that will only return the information for the default system trace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Switch that will only return the information for the default system trace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>The id(s) of the Trace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace Author: Garry Bargsley (@gbargsley), blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Lists all the trace files on the sql2016 SQL Server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2016 -Default </dev:code><dev:remarks><maml:para> Lists the default trace information on the sql2016 SQL Server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaTrace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaTraceFlag</command:name><command:noun>DbaTraceFlag</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get global Trace Flag(s) information for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Returns Trace Flags that are enabled globally on each instance(s) of SQL Server as an object.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaTraceFlag</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Use this switch to filter to a specific Trace Flag.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>Use this switch to filter to a specific Trace Flag.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, TraceFlag, DBCC Author: Kevin Bullen (@sqlpadawan) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTraceFlag -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Trace Flag information on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTraceFlag -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Trace Flag(s) for the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTraceFlag -SqlInstance localhost -TraceFlag 4199,3205 </dev:code><dev:remarks><maml:para> Returns Trace Flag status for TF 4199 and 3205 for the local SQL Server instance if they are enabled. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaTraceFlag</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaUptime</command:name><command:noun>DbaUptime</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the uptime of the SQL Server instance, and if required the hosting windows server</maml:para></maml:description></command:details><maml:description><maml:para>By default, this command returns for each SQL Server instance passed in:</maml:para><maml:para>SQL Instance last startup time, Uptime as a PS TimeSpan, Uptime as a formatted string</maml:para><maml:para>Hosting Windows server last startup time, Uptime as a PS TimeSpan, Uptime as a formatted string</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaUptime</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CIM, Instance, Utility Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaUptime -SqlInstance SqlBox1\Instance2 </dev:code><dev:remarks><maml:para> Returns 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 instance on winserver </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaUptime -SqlInstance winserver\sqlexpress, sql2016 </dev:code><dev:remarks><maml:para> Returns 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 instance on host winserver and the default instance on host sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Get-DbaUptime </dev:code><dev:remarks><maml:para> Returns 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 listed in the Central Management Server on sql2014 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaUptime</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaUserPermission</command:name><command:noun>DbaUserPermission</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays detailed permissions information for the server and database roles and securables.</maml:para></maml:description></command:details><maml:description><maml:para>This command will display all server logins, server level securables, database logins and database securables.</maml:para><maml:para>DISA STIG implementors will find this command useful as it uses Permissions.sql provided by DISA.</maml:para><maml:para>Note that if you Ctrl-C out of this command and end it prematurely, it will leave behind a STIG schema in tempdb.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaUserPermission</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabase</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludePublicGuest</maml:name><maml:description><maml:para>Allows you to include output for public and guest grants.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>Allows you to include output on sys schema objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSecurables</maml:name><maml:description><maml:para>Allows you to exclude object-level permissions from the output, and only return role permission(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSecurables</maml:name><maml:description><maml:para>Allows you to exclude object-level permissions from the output, and only return role permission(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemDatabase</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludePublicGuest</maml:name><maml:description><maml:para>Allows you to include output for public and guest grants.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemObjects</maml:name><maml:description><maml:para>Allows you to include output on sys schema objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Security, User Author: Brandon Abshire, netnerds.net | Josh Smith Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaUserPermission -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check server and database permissions for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaUserPermission -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Check server and database permissions on server sql2008 for only the TestDB database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaUserPermission -SqlInstance sql2008 -Database TestDB -IncludePublicGuest -IncludeSystemObjects </dev:code><dev:remarks><maml:para> Check server and database permissions on server sql2008 for only the TestDB database, including public and guest grants, and sys schema objects. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaUserPermission</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWaitingTask</command:name><command:noun>DbaWaitingTask</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays waiting task.</maml:para></maml:description></command:details><maml:description><maml:para>This command is based on waiting task T-SQL script published by Paul Randal.</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/updated-sys-dm_os_waiting_tasks-script-2/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWaitingTask</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version XXXX or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Find the waiting task of one or more specific process ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemSpid</maml:name><maml:description><maml:para>If this switch is enabled, the output will include the system sessions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemSpid</maml:name><maml:description><maml:para>If this switch is enabled, the output will include the system sessions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Find the waiting task of one or more specific process ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version XXXX or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Waits, Task Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitingTask -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns the waiting task for all sessions on sqlserver2014a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitingTask -SqlInstance sqlserver2014a -IncludeSystemSpid </dev:code><dev:remarks><maml:para> Returns the waiting task for all sessions (user and system) on sqlserver2014a </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWaitingTask</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWaitResource</command:name><command:noun>DbaWaitResource</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Returns the resource being waited upon</maml:para></maml:description></command:details><maml:description><maml:para>Given a wait resource in the form of 'PAGE: 10:1:9180084' returns the database, data file and the system object which is being waited up.</maml:para><maml:para>Given a wait resource in the form of 'KEY: 7:35457594073541168 (de21f92a1572)', returns the database, object and index that is being waited on, With the -row switch the row data will also be returned.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWaitResource</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>WaitResource</maml:name><maml:description><maml:para>The wait resource value as supplied in sys.dm_exec_requests</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Row</maml:name><maml:description><maml:para>If this switch provided also returns the value of the row being waited on with KEY wait resources</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Row</maml:name><maml:description><maml:para>If this switch provided also returns the value of the row being waited on with KEY wait resources</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitResource</maml:name><maml:description><maml:para>The wait resource value as supplied in sys.dm_exec_requests</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Pages, DBCC Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitResource -SqlInstance server1 -WaitResource 'PAGE: 10:1:9180084' </dev:code><dev:remarks><maml:para> Will return an object containing; database name, data file name, schema name and the object which owns the resource </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitResource -SqlInstance server2 -WaitResource 'KEY: 7:35457594073541168 (de21f92a1572)' </dev:code><dev:remarks><maml:para> Will return an object containing; database name, schema name and index name which is being waited on. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitResource -SqlInstance server2 -WaitResource 'KEY: 7:35457594073541168 (de21f92a1572)' -row </dev:code><dev:remarks><maml:para> Will 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWaitResource</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWaitStatistic</command:name><command:noun>DbaWaitStatistic</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Displays wait statistics</maml:para></maml:description></command:details><maml:description><maml:para>This command is based off of Paul Randal's post "Wait statistics, or please tell me where it hurts"</maml:para><maml:para>Returns:</maml:para><maml:para>WaitType</maml:para><maml:para>Category</maml:para><maml:para>WaitSeconds</maml:para><maml:para>ResourceSeconds</maml:para><maml:para>SignalSeconds</maml:para><maml:para>WaitCount</maml:para><maml:para>Percentage</maml:para><maml:para>AverageWaitSeconds</maml:para><maml:para>AverageResourceSeconds</maml:para><maml:para>AverageSignalSeconds</maml:para><maml:para>URL</maml:para><maml:para>Reference: https://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWaitStatistic</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Threshold, in percentage of all waits on the system. Default per Paul's post is 95%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeIgnorable</maml:name><maml:description><maml:para>Some waits are no big deal and can be safely ignored in most circumstances. If you've got weird issues with mirroring or AGs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeIgnorable</maml:name><maml:description><maml:para>Some waits are no big deal and can be safely ignored in most circumstances. If you've got weird issues with mirroring or AGs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Threshold, in percentage of all waits on the system. Default per Paul's post is 95%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Waits, WaitStats Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitStatistic -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check wait statistics for servers sql2008 and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitStatistic -SqlInstance sql2008 -Threshold 98 -IncludeIgnorable </dev:code><dev:remarks><maml:para> Check wait statistics on server sql2008 for thresholds above 98% and include wait stats that are most often, but not always, ignorable </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWaitStatistic -SqlInstance sql2008 | Select-Object * </dev:code><dev:remarks><maml:para> Shows detailed notes, if available, from Paul's post </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaWaitStatistic -SqlInstance sql2008 -Threshold 100 -IncludeIgnorable | Select-Object * | ConvertTo-DbaDataTable </dev:code><dev:remarks><maml:para> Collects all Wait Statistics (including ignorable waits) on server sql2008 into a Data Table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = Get-DbaWaitStatistic -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> PS C:\> foreach ($row in ($output | Sort-Object -Unique Url)) { Start-Process ($row).Url } Displays the output then loads the associated sqlskills website for each result. Opens one tab per unique URL. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWaitStatistic</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWindowsLog</command:name><command:noun>DbaWindowsLog</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets Windows Application events associated with an instance</maml:para></maml:description></command:details><maml:description><maml:para>Gets Windows Application events associated with an instance</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWindowsLog</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The instance(s) to retrieve the event logs from</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Start</maml:name><maml:description><maml:para>Default: 1970 Retrieve all events starting from this timestamp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>End</maml:name><maml:description><maml:para>Default: Now Retrieve all events that happened before this timestamp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential to be used to connect to the Server. Note this is a Windows credential, as this command requires we communicate with the computer and not with the SQL instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxThreads</maml:name><maml:description><maml:para>Default: Unlimited The maximum number of parallel threads used on the local computer. Given that those will mostly be waiting for the remote system, there is usually no need to limit this.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxRemoteThreads</maml:name><maml:description><maml:para>Default: 2 The maximum number of parallel threads that are executed on the target sql server. These processes will cause considerable CPU load, so a low limit is advisable in most scenarios. Any value lower than 1 disables the limit</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential to be used to connect to the Server. Note this is a Windows credential, as this command requires we communicate with the computer and not with the SQL instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>End</maml:name><maml:description><maml:para>Default: Now Retrieve all events that happened before this timestamp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxRemoteThreads</maml:name><maml:description><maml:para>Default: 2 The maximum number of parallel threads that are executed on the target sql server. These processes will cause considerable CPU load, so a low limit is advisable in most scenarios. Any value lower than 1 disables the limit</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxThreads</maml:name><maml:description><maml:para>Default: Unlimited The maximum number of parallel threads used on the local computer. Given that those will mostly be waiting for the remote system, there is usually no need to limit this.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The instance(s) to retrieve the event logs from</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Start</maml:name><maml:description><maml:para>Default: 1970 Retrieve all events starting from this timestamp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Logging, OS Author: Drew Furgiuele | Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $ErrorLogs = Get-DbaWindowsLog -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> PS C:\> $ErrorLogs | Where-Object ErrorNumber -eq 18456 Returns all lines in the errorlogs that have event number 18456 in them This exists to ignore the Script Analyzer rule for Start-Runspace </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWindowsLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcAvailableDisk</command:name><command:noun>DbaWsfcAvailableDisk</command:noun><command:verb>Get</command:verb><maml:description><maml:para>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.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcAvailableDisk</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcAvailableDisk -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets available disks from the failover cluster cluster01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcAvailableDisk</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcCluster</command:name><command:noun>DbaWsfcCluster</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more failover clusters in a given domain.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more failover clusters in a given domain.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcCluster</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcCluster -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets failover cluster information about cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcCluster -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all cluster values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcCluster</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcDisk</command:name><command:noun>DbaWsfcDisk</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about the clustered disks on one or more failover clusters in a given domain.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about the clustered disks on one or more failover clusters in a given domain.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcDisk</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcDisk -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets disk information from the failover cluster cluster01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcDisk</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcNetwork</command:name><command:noun>DbaWsfcNetwork</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more networks in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more networks in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcNetwork</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Network or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Network or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcNetwork -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets network information from the failover cluster cluster01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcNetwork</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcNetworkInterface</command:name><command:noun>DbaWsfcNetworkInterface</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more network adapters in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more network adapters in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcNetworkInterface</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Network or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Network or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcNetworkInterface -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets network interface information from the failover cluster cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcNetworkInterface -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all network interface values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcNetworkInterface</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcNode</command:name><command:noun>DbaWsfcNode</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more nodes, or servers, in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more nodes, or servers, in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcNode</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcNode -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets node information from the failover cluster cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcNode -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all node values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcNode</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcResource</command:name><command:noun>DbaWsfcResource</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more resources in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more resources in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcResource</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcResource -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets resource information from the failover cluster cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcResource -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all resource values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcResource</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcResourceGroup</command:name><command:noun>DbaWsfcResourceGroup</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more resource groups in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more resource groups in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcResourceGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcResourceGroup -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets resource group information from the failover cluster cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcResourceGroup -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all resource values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcResourceGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcResourceType</command:name><command:noun>DbaWsfcResourceType</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more resource types in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more resource types in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcResourceType</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcResourceType -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets resource type information from the failover cluster cluster01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcResourceType</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcRole</command:name><command:noun>DbaWsfcRole</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about one or more clustered roles (resource groups) in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about one or more clustered roles (resource groups) in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcRole</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Role or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a Role or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcRole -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets role information from the failover cluster cluster01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcRole -ComputerName cluster01 | Select-Object * </dev:code><dev:remarks><maml:para> Shows all role values, including the ones not shown in the default view </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaWsfcSharedVolume</command:name><command:noun>DbaWsfcSharedVolume</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets information about Cluster Shared Volumes in a failover cluster.</maml:para></maml:description></command:details><maml:description><maml:para>Gets information about Cluster Shared Volumes in a failover cluster.</maml:para><maml:para>All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaWsfcSharedVolume</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target cluster name. Can be a node or the cluster name itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the cluster using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSFC, FCI, WindowsCluster, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaWsfcSharedVolume -ComputerName cluster01 </dev:code><dev:remarks><maml:para> Gets shared volume (CSV) information from the failover cluster cluster01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaWsfcSharedVolume</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXEObject</command:name><command:noun>DbaXEObject</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets a list of extended events objects exposed by event packages from specified SQL Server instance(s).</maml:para></maml:description></command:details><maml:description><maml:para>This function returns a list of extended events objects exposed by event packages from specified SQL Server instance(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXEObject</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Used to specify the type. Valid types include: Action Event Map Message PredicateComparator PredicateSource Target Type</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Used to specify the type. Valid types include: Action Event Map Message PredicateComparator PredicateSource Target Type</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXEObject -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Lists all the XE Objects on the sql2016 SQL Server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXEObject -SqlInstance sql2017 -Type Action, Event </dev:code><dev:remarks><maml:para> Lists all the XE Objects of type Action and Event on the sql2017 SQL Server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXEObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets a list of Extended Events Sessions from the specified SQL Server instance(s).</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves a list of Extended Events Sessions present on the specified SQL Server instance(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXESession</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return specific sessions. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return specific sessions. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Klaas Vandenberghe (@PowerDBAKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns a custom object with ComputerName, SQLInstance, Session, StartTime, Status and other properties. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance ServerA\sql987 | Format-Table ComputerName, SqlInstance, Session, Status -AutoSize </dev:code><dev:remarks><maml:para> Returns a formatted table displaying ComputerName, SqlInstance, Session, and Status. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'ServerA\sql987','ServerB' | Get-DbaXESession </dev:code><dev:remarks><maml:para> Returns a custom object with ComputerName, SqlInstance, Session, StartTime, Status and other properties, from multiple SQL instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXESessionTarget</command:name><command:noun>DbaXESessionTarget</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get a list of Extended Events Session Targets from the specified SQL Server instance(s).</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves a list of Extended Events Session Targets from the specified SQL Server instance(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXESessionTarget</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaXESessionTarget</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaXESessionTarget</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies an XE session returned by Get-DbaXESession to search.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies an XE session returned by Get-DbaXESession to search.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTarget -SqlInstance ServerA\sql987 -Session system_health </dev:code><dev:remarks><maml:para> Shows targets for the system_health session on ServerA\sql987. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2016 -Session system_health | Get-DbaXESessionTarget </dev:code><dev:remarks><maml:para> Returns the targets for the system_health session on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2016 -Session system_health | Get-DbaXESessionTarget -Target package0.event_file </dev:code><dev:remarks><maml:para> Return only the package0.event_file target for the system_health session on sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXESessionTarget</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXESessionTargetFile</command:name><command:noun>DbaXESessionTargetFile</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get a file system object from the Extended Events Session Target Files.</maml:para></maml:description></command:details><maml:description><maml:para>Get a file system object from the Extended Events Session Target Files.</maml:para><maml:para>Note: this performs a Get-ChildItem on remote servers if the specified target SQL Server is remote.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXESessionTargetFile</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return files from a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return files from a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaXESessionTargetFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return files from a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return files from a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-DbaXESessionTargetFile</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return files from a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return files from a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from piping in Get-DbaXESessionTarget.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.XEvent.Target[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Target[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from piping in Get-DbaXESessionTarget.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Target[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Target[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return files from a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Target</maml:name><maml:description><maml:para>Only return files from a specific target.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTargetFile -SqlInstance sql2017 -Session 'Long Running Queries' </dev:code><dev:remarks><maml:para> Shows Target Files for the 'Long Running Queries' session on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2016 -Session 'Long Running Queries' | Get-DbaXESessionTarget | Get-DbaXESessionTargetFile </dev:code><dev:remarks><maml:para> Returns the Target Files for the system_health session on sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXESessionTargetFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXESessionTemplate</command:name><command:noun>DbaXESessionTemplate</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Parses Extended Event XML templates. Defaults to parsing templates in the dbatools template repository (/bin/XEtemplates/).</maml:para></maml:description></command:details><maml:description><maml:para>Parses Extended Event XML templates. Defaults to parsing templates in the dbatools template repository (/bin/XEtemplates/).</maml:para><maml:para>The default repository contains templates from:</maml:para><maml:para>Microsoft's Templates that come with SSMS</maml:para><maml:para>Jes Borland's "Everyday Extended Events" presentation and GitHub repository (https://github.com/grrlgeek/extended-events)</maml:para><maml:para>Christian Grafe (@ChrGraefe) XE Repo: https://github.com/chrgraefe/sqlscripts/blob/master/XE-Events/</maml:para><maml:para>Erin Stellato's Blog: https://www.sqlskills.com/blogs/erin/</maml:para><maml:para>Some profile templates converted using:</maml:para><maml:para>sp_SQLskills_ConvertTraceToExtendedEvents.sql</maml:para><maml:para>Jonathan M. Kehayias, SQLskills.com</maml:para><maml:para>http://sqlskills.com/blogs/jonathan</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXESessionTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (/bin/XEtemplates/).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering. Alternatively, you can use Out-GridView -Passthru to select objects and pipe them to Import-DbaXESessionTemplate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies one or more of the templates provided by dbatools. Press tab to cycle through the list of options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the template directory. Defaults to the dbatools template repository (/bin/XEtemplates/).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Pattern</maml:name><maml:description><maml:para>Specify a pattern for filtering. Alternatively, you can use Out-GridView -Passthru to select objects and pipe them to Import-DbaXESessionTemplate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies one or more of the templates provided by dbatools. Press tab to cycle through the list of options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate </dev:code><dev:remarks><maml:para> Returns information about all the templates in the local dbatools repository. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate | Out-GridView -PassThru | Import-DbaXESessionTemplate -SqlInstance sql2017 | Start-DbaXESession </dev:code><dev:remarks><maml:para> Allows you to select a Session template, then import it to the specified instance and start the session. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate -Path "$home\Documents\SQL Server Management Studio\Templates\XEventTemplates" </dev:code><dev:remarks><maml:para> Returns information about all the templates in your local XEventTemplates repository. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate -Pattern duration </dev:code><dev:remarks><maml:para> Returns information about all the templates that match the word "duration" in the title, category or body. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate | Select-Object * </dev:code><dev:remarks><maml:para> Returns more information about the template, including the full path/filename. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXESessionTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXESmartTarget</command:name><command:noun>DbaXESmartTarget</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets an XESmartTarget PowerShell job created by Start-DbaXESmartTarget.</maml:para></maml:description></command:details><maml:description><maml:para>Gets an XESmartTarget PowerShell job created by Start-DbaXESmartTarget.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXESmartTarget</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESmartTarget </dev:code><dev:remarks><maml:para> Gets an XESmartTarget PowerShell Job created by Start-DbaXESmartTarget. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXESmartTarget</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Get-DbaXEStore</command:name><command:noun>DbaXEStore</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Get a Extended Events store</maml:para></maml:description></command:details><maml:description><maml:para>Get a Extended Events store</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaXEStore</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXEStore -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns an XEvent Store. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaXEStore</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Grant-DbaAgPermission</command:name><command:noun>DbaAgPermission</command:noun><command:verb>Grant</command:verb><maml:description><maml:para>Grants endpoint and availability group permissions to a login.</maml:para></maml:description></command:details><maml:description><maml:para>Grants endpoint and availability group permissions to a login. If the account is a Windows login and does not exist, it will be automatically added.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Grant-DbaAgPermission</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login or logins to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only modify specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specify type: Endpoint or AvailabilityGroup. Endpoint will modify the DatabaseMirror endpoint type.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Permission</maml:name><maml:description><maml:para>Grants one or more permissions: Alter Connect Control CreateSequence CreateAnyDatabase Delete Execute Impersonate Insert Receive References Select Send TakeOwnership Update ViewChangeTracking ViewDefinition CreateAnyDatabase Connect is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only modify specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login or logins to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Permission</maml:name><maml:description><maml:para>Grants one or more permissions: Alter Connect Control CreateSequence CreateAnyDatabase Delete Execute Impersonate Insert Receive References Select Send TakeOwnership Update ViewChangeTracking ViewDefinition CreateAnyDatabase Connect is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specify type: Endpoint or AvailabilityGroup. Endpoint will modify the DatabaseMirror endpoint type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Grant-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup SharePoint -Permission CreateAnyDatabase </dev:code><dev:remarks><maml:para> Adds CreateAnyDatabase permissions to the SharePoint availability group on sql2017a. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Grant-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup ag1, ag2 -Permission CreateAnyDatabase -Confirm </dev:code><dev:remarks><maml:para> Adds CreateAnyDatabase permissions to the ag1 and ag2 availability groups on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2017a | Out-GridView -Passthru | Grant-DbaAgPermission -Type EndPoint </dev:code><dev:remarks><maml:para> Grants the selected logins Connect permissions on the DatabaseMirroring endpoint for sql2017a </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Grant-DbaAgPermission</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaBinaryFile</command:name><command:noun>DbaBinaryFile</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Imports binary files into SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Imports binary files into SQL Server.</maml:para><maml:para>If specific filename and binary columns aren't specified, the command will guess based on the datatype (binary/image) for the binary column and a match for "name" as the filename column.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaBinaryFile</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to upload to. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The specific schema to use. If not specified, the default schema will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Statement</maml:name><maml:description><maml:para>To upload files, you basically have to use a statement line this: INSERT INTO db.tbl ([FileNameColumn], [bBinaryColumn]) VALUES (@FileName, @FileContents) We try our best to guess the column names, but if you need to specify the SQL statement, use this parameter. The only required parameter is @FileContents. If you want to use a filename column, you must use @FileName.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileNameColumn</maml:name><maml:description><maml:para>The column name that will contain the filename. If not specified, we will try to guess based on the column name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BinaryColumn</maml:name><maml:description><maml:para>The column name that will contain the binary data. If not specified, we will try to guess based on the column name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFileNameColumn</maml:name><maml:description><maml:para>If you don't have a filename column, use this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable or Get-DbaBinaryFileTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. Accepts pipeline input from Get-ChildItem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>A directory full of files to import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BinaryColumn</maml:name><maml:description><maml:para>The column name that will contain the binary data. If not specified, we will try to guess based on the column name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileNameColumn</maml:name><maml:description><maml:para>The column name that will contain the filename. If not specified, we will try to guess based on the column name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Specifies the full file path of the output file. Accepts pipeline input from Get-ChildItem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Table objects to be piped in from Get-DbaDbTable or Get-DbaBinaryFileTable</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoFileNameColumn</maml:name><maml:description><maml:para>If you don't have a filename column, use this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>A directory full of files to import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The specific schema to use. If not specified, the default schema will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Statement</maml:name><maml:description><maml:para>To upload files, you basically have to use a statement line this: INSERT INTO db.tbl ([FileNameColumn], [bBinaryColumn]) VALUES (@FileName, @FileContents) We try our best to guess the column names, but if you need to specify the SQL statement, use this parameter. The only required parameter is @FileContents. If you want to use a filename column, you must use @FileName.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Define a specific table you would like to upload to. You can specify up to three-part name like db.sch.tbl. If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to find table named 'Table' on schema 'First' and database 'dbo'. The correct way to find table named 'First.Table' on schema 'dbo' is by passing dbo.[First.Table] Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to find a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Backup, Export Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem C:\photos | Import-DbaBinaryFile -SqlInstance sqlcs -Database employees -Table photos </dev:code><dev:remarks><maml:para> Imports all photos from C:\photos into the photos table in the employees database on sqlcs. Automatically guesses the column names for the image and filename columns. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaBinaryFile -SqlInstance sqlcs -Database tempdb -Table BunchOFiles -FilePath C:\azure\adalsql.msi </dev:code><dev:remarks><maml:para> Imports the file adalsql.msi into the BunchOFiles table in the tempdb database on sqlcs. Automatically guesses the column names for the image and filename columns. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaBinaryFile -SqlInstance sqlcs -Database tempdb -Table BunchOFiles -FilePath C:\azure\adalsql.msi -FileNameColumn fname -BinaryColumn data </dev:code><dev:remarks><maml:para> Imports the file adalsql.msi into the BunchOFiles table in the tempdb database on sqlcs. Uses the fname and data columns for the filename and binary data. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaBinaryFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaCsv</command:name><command:noun>DbaCsv</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Efficiently imports very large (and small) CSV files into SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Import-DbaCsv takes advantage of .NET's super fast SqlBulkCopy class to import CSV files into SQL Server.</maml:para><maml:para>The entire import is performed within a transaction, so if a failure occurs or the script is aborted, no changes will persist.</maml:para><maml:para>If the table or view specified does not exist and -AutoCreateTable, it will be automatically created using slow and inefficient but accommodating data types.</maml:para><maml:para>This importer supports fields spanning multiple lines. The only restriction is that they must be quoted, otherwise it would not be possible to distinguish between malformed data and multi-line values.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaCsv</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies path to the CSV file(s) to be imported. Multiple files may be imported at once.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server Instance to import data into.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database the CSV will be imported into. Options for this this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specifies the SQL table or view where CSV will be imported into. If a table name is not specified, the table name will be automatically determined from the filename. If the table specified does not exist and -AutoCreateTable, it will be automatically created using slow and inefficient but accommodating data types. If the automatically generated table datatypes do not work for you, please create the table prior to import. If you want to import specific columns from a CSV, create a view with corresponding columns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Specifies the schema in which the SQL table or view where CSV will be imported into resides. Default is dbo. If a schema does not currently exist, it will be created, after a prompt to confirm this. Authorization will be set to dbo by default. This parameter overrides -UseFileNameForSchema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated prior to import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Delimiter</maml:name><maml:description><maml:para>Specifies the delimiter used in the imported file(s). If no delimiter is specified, comma is assumed. Valid delimiters are '`t`, '|', ';',' ' and ',' (tab, pipe, semicolon, space, and comma).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleColumn</maml:name><maml:description><maml:para>Specifies that the file contains a single column of data. Otherwise, the delimiter check bombs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Specifies the batch size for the import. Defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Specifies the import row count interval for reporting progress. A notification will be shown after each group of this many rows has been imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TableLock</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to acquire a table lock will be used. Per Microsoft "Obtain a bulk update lock for the duration of the bulk copy operation. When not specified, row locks are used."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to check constraints will be used. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to allow insert triggers to be executed will be used. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to keep identity values from the source will be used. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to keep NULL values in the table will be used. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Import only specific columns. To remap column names, use the ColumnMap.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>By default, the bulk copy tries to automap columns. When it doesn't work as desired, this parameter will help. Check out the examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepOrdinalOrder</maml:name><maml:description><maml:para>By default, the importer will attempt to map exact-match columns names from the source document to the target table. Using this parameter will keep the ordinal order instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates a table if it does not already exist. The table will be created with sub-optimal data types such as nvarchar(max)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoProgress</maml:name><maml:description><maml:para>The progress bar is pretty but can slow down imports. Use this parameter to quietly import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoHeaderRow</maml:name><maml:description><maml:para>By default, the first row is used to determine column names for the data being imported. Use this switch if the first row contains data and not column names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseFileNameForSchema</maml:name><maml:description><maml:para>If this switch is enabled, the script will try to find the schema name in the input file by looking for a period (.) in the file name. If used with the -Table parameter you may still specify the target table name. If -Table is not used the file name after the first period will be used for the table name. For example test.data.csv will import the csv contents to a table in the test schema. If it finds one it will use the file name up to the first period as the schema. If there is no period in the filename it will default to dbo. If a schema does not currently exist, it will be created, after a prompt to confirm this. Authorization will be set to dbo by default. This behaviour will be overridden if the -Schema parameter is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Quote</maml:name><maml:description><maml:para>Defines the default quote character wrapping every field. Default: double-quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Escape</maml:name><maml:description><maml:para>Defines the default escape character letting insert quotation characters inside a quoted field. The escape character can be the same as the quote character. Default: double-quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Comment</maml:name><maml:description><maml:para>Defines the default comment character indicating that a line is commented out. Default: hashtag</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrimmingOption</maml:name><maml:description><maml:para>Determines which values should be trimmed. Default is "None". Options are All, None, UnquotedOnly and QuotedOnly.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferSize</maml:name><maml:description><maml:para>Defines the default buffer size. The default BufferSize is 4096.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ParseErrorAction</maml:name><maml:description><maml:para>By default, the parse error action throws an exception and ends the import. You can also choose AdvanceToNextLine which basically ignores parse errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>By default, set to UTF-8. The encoding of the file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NullValue</maml:name><maml:description><maml:para>The value which denotes a DbNull-value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxQuotedFieldLength</maml:name><maml:description><maml:para>The maximum length (in bytes) for any quoted field.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipEmptyLine</maml:name><maml:description><maml:para>Skip empty lines.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SupportsMultiline</maml:name><maml:description><maml:para>Indicates if the importer should support multiline fields.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseColumnDefault</maml:name><maml:description><maml:para>Use the column default values if the field is not in the record.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTransaction</maml:name><maml:description><maml:para>Do not use a transaction when performing the import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>Creates a table if it does not already exist. The table will be created with sub-optimal data types such as nvarchar(max)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Specifies the batch size for the import. Defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferSize</maml:name><maml:description><maml:para>Defines the default buffer size. The default BufferSize is 4096.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to check constraints will be used. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Import only specific columns. To remap column names, use the ColumnMap.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>By default, the bulk copy tries to automap columns. When it doesn't work as desired, this parameter will help. Check out the examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Comment</maml:name><maml:description><maml:para>Defines the default comment character indicating that a line is commented out. Default: hashtag</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database the CSV will be imported into. Options for this this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Delimiter</maml:name><maml:description><maml:para>Specifies the delimiter used in the imported file(s). If no delimiter is specified, comma is assumed. Valid delimiters are '`t`, '|', ';',' ' and ',' (tab, pipe, semicolon, space, and comma).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>By default, set to UTF-8. The encoding of the file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Escape</maml:name><maml:description><maml:para>Defines the default escape character letting insert quotation characters inside a quoted field. The escape character can be the same as the quote character. Default: double-quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to allow insert triggers to be executed will be used. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to keep identity values from the source will be used. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to keep NULL values in the table will be used. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepOrdinalOrder</maml:name><maml:description><maml:para>By default, the importer will attempt to map exact-match columns names from the source document to the target table. Using this parameter will keep the ordinal order instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxQuotedFieldLength</maml:name><maml:description><maml:para>The maximum length (in bytes) for any quoted field.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoHeaderRow</maml:name><maml:description><maml:para>By default, the first row is used to determine column names for the data being imported. Use this switch if the first row contains data and not column names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoProgress</maml:name><maml:description><maml:para>The progress bar is pretty but can slow down imports. Use this parameter to quietly import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Specifies the import row count interval for reporting progress. A notification will be shown after each group of this many rows has been imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTransaction</maml:name><maml:description><maml:para>Do not use a transaction when performing the import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NullValue</maml:name><maml:description><maml:para>The value which denotes a DbNull-value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ParseErrorAction</maml:name><maml:description><maml:para>By default, the parse error action throws an exception and ends the import. You can also choose AdvanceToNextLine which basically ignores parse errors.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies path to the CSV file(s) to be imported. Multiple files may be imported at once.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Quote</maml:name><maml:description><maml:para>Defines the default quote character wrapping every field. Default: double-quotes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Char</command:parameterValue><dev:type><maml:name>Char</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Specifies the schema in which the SQL table or view where CSV will be imported into resides. Default is dbo. If a schema does not currently exist, it will be created, after a prompt to confirm this. Authorization will be set to dbo by default. This parameter overrides -UseFileNameForSchema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleColumn</maml:name><maml:description><maml:para>Specifies that the file contains a single column of data. Otherwise, the delimiter check bombs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipEmptyLine</maml:name><maml:description><maml:para>Skip empty lines.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server Instance to import data into.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SupportsMultiline</maml:name><maml:description><maml:para>Indicates if the importer should support multiline fields.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specifies the SQL table or view where CSV will be imported into. If a table name is not specified, the table name will be automatically determined from the filename. If the table specified does not exist and -AutoCreateTable, it will be automatically created using slow and inefficient but accommodating data types. If the automatically generated table datatypes do not work for you, please create the table prior to import. If you want to import specific columns from a CSV, create a view with corresponding columns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TableLock</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to acquire a table lock will be used. Per Microsoft "Obtain a bulk update lock for the duration of the bulk copy operation. When not specified, row locks are used."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrimmingOption</maml:name><maml:description><maml:para>Determines which values should be trimmed. Default is "None". Options are All, None, UnquotedOnly and QuotedOnly.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated prior to import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseColumnDefault</maml:name><maml:description><maml:para>Use the column default values if the field is not in the record.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseFileNameForSchema</maml:name><maml:description><maml:para>If this switch is enabled, the script will try to find the schema name in the input file by looking for a period (.) in the file name. If used with the -Table parameter you may still specify the target table name. If -Table is not used the file name after the first period will be used for the table name. For example test.data.csv will import the csv contents to a table in the test schema. If it finds one it will use the file name up to the first period as the schema. If there is no period in the filename it will default to dbo. If a schema does not currently exist, it will be created, after a prompt to confirm this. Authorization will be set to dbo by default. This behaviour will be overridden if the -Schema parameter is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Import, Data, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path C:\temp\housing.csv -SqlInstance sql001 -Database markets </dev:code><dev:remarks><maml:para> Imports the entire comma-delimited housing.csv to the SQL "markets" database on a SQL Server named sql001, using the first row as column names. Since a table name was not specified, the table name is automatically determined from filename as "housing". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path .\housing.csv -SqlInstance sql001 -Database markets -Table housing -Delimiter "`t" -NoHeaderRow </dev:code><dev:remarks><maml:para> Imports the entire tab-delimited housing.csv, including the first row which is not used for colum names, to the SQL markets database, into the housing table, on a SQL Server named sql001. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path C:\temp\huge.txt -SqlInstance sqlcluster -Database locations -Table latitudes -Delimiter "|" </dev:code><dev:remarks><maml:para> Imports the entire pipe-delimited huge.txt to the locations database, into the latitudes table on a SQL Server named sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path c:\temp\SingleColumn.csv -SqlInstance sql001 -Database markets -Table TempTable -SingleColumn </dev:code><dev:remarks><maml:para> Imports the single column CSV into TempTable </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem -Path \\FileServer\csvs | Import-DbaCsv -SqlInstance sql001, sql002 -Database tempdb -AutoCreateTable </dev:code><dev:remarks><maml:para> Imports every CSV in the \\FileServer\csvs path into both sql001 and sql002's tempdb database. Each CSV will be imported into an automatically determined table name. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem -Path \\FileServer\csvs | Import-DbaCsv -SqlInstance sql001, sql002 -Database tempdb -AutoCreateTable -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were to be executed </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path c:\temp\dataset.csv -SqlInstance sql2016 -Database tempdb -Column Name, Address, Mobile </dev:code><dev:remarks><maml:para> Import only Name, Address and Mobile even if other columns exist. All other columns are ignored and therefore null or default values. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path C:\temp\schema.data.csv -SqlInstance sql2016 -database tempdb -UseFileNameForSchema </dev:code><dev:remarks><maml:para> Will import the contents of C:\temp\schema.data.csv to table 'data' in schema 'schema'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaCsv -Path C:\temp\schema.data.csv -SqlInstance sql2016 -database tempdb -UseFileNameForSchema -Table testtable </dev:code><dev:remarks><maml:para> Will import the contents of C:\temp\schema.data.csv to table 'testtable' in schema 'schema'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $columns = @{ </dev:code><dev:remarks><maml:para> >> Text = 'FirstName' >> Number = 'PhoneNumber' >> } PS C:\> Import-DbaCsv -Path c:\temp\supersmall.csv -SqlInstance sql2016 -Database tempdb -ColumnMap $columns The CSV column 'Text' is inserted into SQL column 'FirstName' and CSV column Number is inserted into the SQL Column 'PhoneNumber'. All other columns are ignored and therefore null or default values. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaCsv</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaPfDataCollectorSetTemplate</command:name><command:noun>DbaPfDataCollectorSetTemplate</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Imports a new Performance Monitor Data Collector Set Template either from the dbatools repository or a file you specify.</maml:para></maml:description></command:details><maml:description><maml:para>Imports a new Performance Monitor Data Collector Set Template either from the dbatools repository or a file you specify.</maml:para><maml:para>When importing data collector sets from the local instance, Run As Admin is required.</maml:para><maml:para>Note: The included counters will be added for all SQL instances on the machine by default.</maml:para><maml:para>For specific instances in addition to the default, use -Instance.</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/windows/desktop/aa371952 for more information</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaPfDataCollectorSetTemplate</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayName</maml:name><maml:description><maml:para>Sets the display name of the data collector set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchedulesEnabled</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that indicates whether the schedules are enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RootPath</maml:name><maml:description><maml:para>Sets the base path where the subdirectories are created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Segment</maml:name><maml:description><maml:para>Sets a value that indicates whether PLA creates new logs if the maximum size or segment duration is reached before the data collector set is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SegmentMaxDuration</maml:name><maml:description><maml:para>Sets the duration that the data collector set can run before it begins writing to new log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SegmentMaxSize</maml:name><maml:description><maml:para>Sets the maximum size of any log file in the data collector set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subdirectory</maml:name><maml:description><maml:para>Sets a base subdirectory of the root path where the next instance of the data collector set will write its logs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubdirectoryFormat</maml:name><maml:description><maml:para>Sets flags that describe how to decorate the subdirectory name. PLA appends the decoration to the folder name. For example, if you specify plaMonthDayHour, PLA appends the current month, day, and hour values to the folder name. If the folder name is MyFile, the result could be MyFile110816.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubdirectoryFormatPattern</maml:name><maml:description><maml:para>Sets a format pattern to use when decorating the folder name. Default is 'yyyyMMdd\-NNNNNN'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Task</maml:name><maml:description><maml:para>Sets the name of a Task Scheduler job to start each time the data collector set stops, including between segments.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskRunAsSelf</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that determines whether the task runs as the data collector set user or as the user specified in the task.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskArguments</maml:name><maml:description><maml:para>Sets the command-line arguments to pass to the Task Scheduler job specified in the IDataCollectorSet::Task property. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa371992 for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskUserTextArguments</maml:name><maml:description><maml:para>Sets the command-line arguments that are substituted for the {usertext} substitution variable in the IDataCollectorSet::TaskArguments property. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa371993 for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopOnCompletion</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that determines whether the data collector set stops when all the data collectors in the set are in a completed state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the xml file or files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>From one or more of the templates from the dbatools repository. Press Tab to cycle through the available options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Instance</maml:name><maml:description><maml:para>By default, the template will be applied to all instances. If you want to set specific ones in addition to the default, supply just the instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials. To use: $scred = Get-Credential, then pass $scred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayName</maml:name><maml:description><maml:para>Sets the display name of the data collector set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Instance</maml:name><maml:description><maml:para>By default, the template will be applied to all instances. If you want to set specific ones in addition to the default, supply just the instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the xml file or files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RootPath</maml:name><maml:description><maml:para>Sets the base path where the subdirectories are created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchedulesEnabled</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that indicates whether the schedules are enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Segment</maml:name><maml:description><maml:para>Sets a value that indicates whether PLA creates new logs if the maximum size or segment duration is reached before the data collector set is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SegmentMaxDuration</maml:name><maml:description><maml:para>Sets the duration that the data collector set can run before it begins writing to new log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SegmentMaxSize</maml:name><maml:description><maml:para>Sets the maximum size of any log file in the data collector set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopOnCompletion</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that determines whether the data collector set stops when all the data collectors in the set are in a completed state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subdirectory</maml:name><maml:description><maml:para>Sets a base subdirectory of the root path where the next instance of the data collector set will write its logs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubdirectoryFormat</maml:name><maml:description><maml:para>Sets flags that describe how to decorate the subdirectory name. PLA appends the decoration to the folder name. For example, if you specify plaMonthDayHour, PLA appends the current month, day, and hour values to the folder name. If the folder name is MyFile, the result could be MyFile110816.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubdirectoryFormatPattern</maml:name><maml:description><maml:para>Sets a format pattern to use when decorating the folder name. Default is 'yyyyMMdd\-NNNNNN'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Task</maml:name><maml:description><maml:para>Sets the name of a Task Scheduler job to start each time the data collector set stops, including between segments.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskArguments</maml:name><maml:description><maml:para>Sets the command-line arguments to pass to the Task Scheduler job specified in the IDataCollectorSet::Task property. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa371992 for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskRunAsSelf</maml:name><maml:description><maml:para>If this switch is enabled, sets a value that determines whether the task runs as the data collector set user or as the user specified in the task.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskUserTextArguments</maml:name><maml:description><maml:para>Sets the command-line arguments that are substituted for the {usertext} substitution variable in the IDataCollectorSet::TaskArguments property. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa371993 for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>From one or more of the templates from the dbatools repository. Press Tab to cycle through the available options.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template 'Long Running Query' </dev:code><dev:remarks><maml:para> Creates a new data collector set named 'Long Running Query' from the dbatools repository on the SQL Server sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template 'Long Running Query' -DisplayName 'New Long running query' -Confirm </dev:code><dev:remarks><maml:para> Creates a new data collector set named "New Long Running Query" using the 'Long Running Query' template. Forces a confirmation if the template exists. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -ComputerName sql2017 -Session db_ola_health | Remove-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template db_ola_health | Start-DbaPfDataCollectorSet Imports a session if it exists, then recreates it using a template. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Allows you to select a Session template then import to an instance named sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template 'Long Running Query' -Instance SHAREPOINT </dev:code><dev:remarks><maml:para> Creates a new data collector set named 'Long Running Query' from the dbatools repository on the SQL Server sql2017 for both the default and the SHAREPOINT instance. If you'd like to remove counters for the default instance, use Remove-DbaPfDataCollectorCounter. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaPfDataCollectorSetTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Imports registered servers and registered server groups to SQL Server Central Management Server (CMS)</maml:para></maml:description></command:details><maml:description><maml:para>Imports registered servers and registered server groups to SQL Server Central Management Server (CMS)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaRegServer</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Optional path to exported reg server XML</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaRegServer, Get-DbaRegServerGroup, CSVs and other objects. If importing from CSV or other object, a column named ServerName is required. Optional columns include Name, Description and Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Imports to specific group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Imports to specific group</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaRegServer, Get-DbaRegServerGroup, CSVs and other objects. If importing from CSV or other object, a column named ServerName is required. Optional columns include Name, Description and Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Optional path to exported reg server XML</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaRegServer -SqlInstance sql2012 -Path C:\temp\corp-regservers.xml </dev:code><dev:remarks><maml:para> Imports C:\temp\corp-regservers.xml to the CMS on sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaRegServer -SqlInstance sql2008 -Group hr\Seattle -Path C:\temp\Seattle.xml </dev:code><dev:remarks><maml:para> Imports C:\temp\Seattle.xml to Seattle subgroup within the hr group on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2008, sql2012 | Import-DbaRegServer -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Imports all registered servers from sql2008 and sql2012 to sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sql2008 -Group hr\Seattle | Import-DbaRegServer -SqlInstance sql2017 -Group Seattle </dev:code><dev:remarks><maml:para> Imports all registered servers from the hr\Seattle group on sql2008 to the Seattle group on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaSpConfigure</command:name><command:noun>DbaSpConfigure</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Updates sp_configure settings on destination server.</maml:para></maml:description></command:details><maml:description><maml:para>Updates sp_configure settings on destination server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaSpConfigure</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, no version check between Source and Destination is performed. By default, the major and minor versions of Source and Destination must match when copying sp_configure settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Import-DbaSpConfigure</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, no version check between Source and Destination is performed. By default, the major and minor versions of Source and Destination must match when copying sp_configure settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Import-DbaSpConfigure</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Specifies a SQL Server instance to set up sp_configure values on using a SQL file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to a SQL script file holding sp_configure queries for each of the settings to be changed. Export-DbaSPConfigure creates a suitable file as its output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Use this SQL credential if you are setting up sp_configure values from a SQL file. Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, no version check between Source and Destination is performed. By default, the major and minor versions of Source and Destination must match when copying sp_configure settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, no version check between Source and Destination is performed. By default, the major and minor versions of Source and Destination must match when copying sp_configure settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to a SQL script file holding sp_configure queries for each of the settings to be changed. Export-DbaSPConfigure creates a suitable file as its output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Use this SQL credential if you are setting up sp_configure values from a SQL file. Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Specifies a SQL Server instance to set up sp_configure values on using a SQL file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>None You cannot pipe objects to Import-DbaSpConfigure</maml:name><maml:uri /><maml:description /></dev:type></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>$true if success</maml:name><maml:uri /><maml:description /></dev:type><maml:description><maml:para>$false if failure</maml:para></maml:description></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SpConfig, Configure, Configuration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaSpConfigure -Source sqlserver -Destination sqlcluster </dev:code><dev:remarks><maml:para> Imports the sp_configure settings from the source server sqlserver and sets them on the sqlcluster server using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaSpConfigure -Source sqlserver -Destination sqlcluster -Force </dev:code><dev:remarks><maml:para> Imports 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaSpConfigure -Source sqlserver -Destination sqlcluster -SourceSqlCredential $SourceSqlCredential -DestinationSqlCredential $DestinationSqlCredential </dev:code><dev:remarks><maml:para> Imports 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 $DestinationSqlCredential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaSpConfigure -SqlInstance sqlserver -Path .\spconfig.sql -SqlCredential $SqlCredential </dev:code><dev:remarks><maml:para> Imports 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaSpConfigure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Imports a json configuration file into the configuration system.</maml:para></maml:description></command:details><maml:description><maml:para>Imports a json configuration file into the configuration system.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the json file to import.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFilter</maml:name><maml:description><maml:para>If specified, only elements with names that are similar (-like) to names in this list will be imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFilter</maml:name><maml:description><maml:para>Elements that are similar (-like) to names in this list will not be imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Peek</maml:name><maml:description><maml:para>Rather than applying the setting, return the configuration items that would have been applied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Import-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Import configuration items specific to a module from the default configuration paths.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleVersion</maml:name><maml:description><maml:para>The configuration version of the module-settings to load.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Where to import the module specific configuration items form. Only file-based scopes are supported for this. By default, all locations are queried, with user settings beating system settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeFilter</maml:name><maml:description><maml:para>Elements that are similar (-like) to names in this list will not be imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeFilter</maml:name><maml:description><maml:para>If specified, only elements with names that are similar (-like) to names in this list will be imported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleName</maml:name><maml:description><maml:para>Import configuration items specific to a module from the default configuration paths.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModuleVersion</maml:name><maml:description><maml:para>The configuration version of the module-settings to load.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the json file to import.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Peek</maml:name><maml:description><maml:para>Rather than applying the setting, return the configuration items that would have been applied.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Where to import the module specific configuration items form. Only file-based scopes are supported for this. By default, all locations are queried, with user settings beating system settings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbatoolsConfig -Path '.\config.json' </dev:code><dev:remarks><maml:para> Imports the configuration stored in '.\config.json' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbatoolsConfig -ModuleName message </dev:code><dev:remarks><maml:para> Imports all the module specific settings that have been persisted in any of the default file system paths. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Import-DbaXESessionTemplate</command:name><command:noun>DbaXESessionTemplate</command:noun><command:verb>Import</command:verb><maml:description><maml:para>Imports a new XESession XML Template</maml:para></maml:description></command:details><maml:description><maml:para>Imports a new XESession XML Template either from the dbatools repository or a file you specify.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Import-DbaXESessionTemplate</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Name of the session to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the xml file or files for the session(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies the name of one of the templates from the dbatools repository. Press tab to cycle through the provided templates.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetFilePath</maml:name><maml:description><maml:para>By default, files will be created in the default xel directory. Use TargetFilePath to change all instances of filename = "file.xel" to filename = "$TargetFilePath\file.xel". Only specify the directory, not the file itself. This path is relative to the destination directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetFileMetadataPath</maml:name><maml:description><maml:para>By default, files will be created in the default xem directory. Use TargetFileMetadataPath to change all instances of filename = "file.xem" to filename = "$TargetFilePath\file.xem". Only specify the directory, not the file itself. This path is relative to the destination directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartUpState</maml:name><maml:description><maml:para>Specifies the start up state of the session. The default is Off.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Name of the session to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the xml file or files for the session(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartUpState</maml:name><maml:description><maml:para>Specifies the start up state of the session. The default is Off.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetFileMetadataPath</maml:name><maml:description><maml:para>By default, files will be created in the default xem directory. Use TargetFileMetadataPath to change all instances of filename = "file.xem" to filename = "$TargetFilePath\file.xem". Only specify the directory, not the file itself. This path is relative to the destination directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetFilePath</maml:name><maml:description><maml:para>By default, files will be created in the default xel directory. Use TargetFilePath to change all instances of filename = "file.xel" to filename = "$TargetFilePath\file.xel". Only specify the directory, not the file itself. This path is relative to the destination directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Specifies the name of one of the templates from the dbatools repository. Press tab to cycle through the provided templates.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template "15 Second IO Error" </dev:code><dev:remarks><maml:para> Creates a new XESession named "15 Second IO Error" from the dbatools repository to the SQL Server sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template "Index Page Splits" -StartUpState On </dev:code><dev:remarks><maml:para> Creates a new XESession named "Index Page Splits" from the dbatools repository to the SQL Server sql2017, starts the XESession and sets the StartUpState to On so that it starts on the next server restart. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template "Query Wait Statistics" -Name "Query Wait Stats" | Start-DbaXESession </dev:code><dev:remarks><maml:para> Creates a new XESession named "Query Wait Stats" using the Query Wait Statistics template, then immediately starts it. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2017 -Session 'Database Health 2014' | Remove-DbaXESession </dev:code><dev:remarks><maml:para> PS C:\> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template 'Database Health 2014' | Start-DbaXESession Removes a session if it exists, then recreates it using a template. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESessionTemplate | Out-GridView -PassThru | Import-DbaXESessionTemplate -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Allows you to select a Session template then import to an instance named sql2017. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Import-DbaXESessionTemplate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaDarlingData</command:name><command:noun>DbaDarlingData</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Installs or updates Erik Darling's stored procedures.</maml:para></maml:description></command:details><maml:description><maml:para>Downloads, extracts and installs Erik Darling's stored procedures</maml:para><maml:para>DarlingData links:</maml:para><maml:para>https://www.erikdarlingdata.com</maml:para><maml:para>https://github.com/erikdarlingdata/DarlingData</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaDarlingData</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install Erik's stored procedures into</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of Erik's to install. Allowed values: main (default) dev</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Procedure</maml:name><maml:description><maml:para>Specifies the name(s) of the procedures to install Allowed Values or Combination of Values: All (default, to install all 3 procedures) Human (to install sp_HumanEvents) Pressure (to install sp_PressureDetector) Quickie (to install sp_QuickieStore)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/erikdarlingdata/DarlingData</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the zip will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of Erik's to install. Allowed values: main (default) dev</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install Erik's stored procedures into</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the zip will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/erikdarlingdata/DarlingData</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Procedure</maml:name><maml:description><maml:para>Specifies the name(s) of the procedures to install Allowed Values or Combination of Values: All (default, to install all 3 procedures) Human (to install sp_HumanEvents) Pressure (to install sp_PressureDetector) Quickie (to install sp_QuickieStore)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, Erik Darling, DarlingData Author: Ant Green (@ant_green) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance server1 -Database master </dev:code><dev:remarks><maml:para> Logs into server1 with Windows authentication and then installs all of Erik's scripts in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance server1\instance1 -Database DBA </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with Windows authentication and then installs tall of Erik's scripts in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance server1\instance1 -Database master -SqlCredential $cred </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with SQL authentication and then installs all of Erik's scripts in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 </dev:code><dev:remarks><maml:para> Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs al of Erik's scripts in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance sql2016 -Branch dev </dev:code><dev:remarks><maml:para> Installs the dev branch version of Erik's scripts in the master database on sql2016 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaDarlingData -SqlInstance server1\instance1 -Database DBA -Procedure Human, Pressure </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with Windows authentication and then installs sp_HumanEvents and sp_PressureDetector of Erik's scripts in the DBA database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaDarlingData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaFirstResponderKit</command:name><command:noun>DbaFirstResponderKit</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Installs or updates the First Responder Kit stored procedures.</maml:para></maml:description></command:details><maml:description><maml:para>Downloads, extracts and installs the First Responder Kit stored procedures</maml:para><maml:para>First Responder Kit links:</maml:para><maml:para>http://FirstResponderKit.org</maml:para><maml:para>https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaFirstResponderKit</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of the First Responder Kit to install. Allowed values: main (default) dev</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install the First Responder Kit stored procedures into</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install FRK from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlyScript</maml:name><maml:description><maml:para>Specifies the name(s) of the script(s) to run for installation. Wildcards are permitted. This way only part of the First Responder Kit can be installed. Using one of the three official Install-* scripts (Install-All-Scripts.sql, Install-Core-Blitz-No-Query-Store.sql, Install-Core-Blitz-With-Query-Store.sql) is possible this way. Even removing the First Responder Kit is possible by using the official Uninstall.sql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the FRK will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of the First Responder Kit to install. Allowed values: main (default) dev</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install the First Responder Kit stored procedures into</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the FRK will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install FRK from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlyScript</maml:name><maml:description><maml:para>Specifies the name(s) of the script(s) to run for installation. Wildcards are permitted. This way only part of the First Responder Kit can be installed. Using one of the three official Install-* scripts (Install-All-Scripts.sql, Install-Core-Blitz-No-Query-Store.sql, Install-Core-Blitz-With-Query-Store.sql) is possible this way. Even removing the First Responder Kit is possible by using the official Uninstall.sql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, FirstResponderKit Author: Tara Kizer, Brent Ozar Unlimited (brentozar.com) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://www.brentozar.com/responder </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance server1 -Database master </dev:code><dev:remarks><maml:para> Logs into server1 with Windows authentication and then installs the FRK in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database DBA </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with Windows authentication and then installs the FRK in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database master -SqlCredential $cred </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with SQL authentication and then installs the FRK in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 </dev:code><dev:remarks><maml:para> Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Install-DbaFirstResponderKit Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance sql2016 -Branch dev </dev:code><dev:remarks><maml:para> Installs the dev branch version of the FRK in the master database on sql2016 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript sp_Blitz.sql, sp_BlitzWho.sql, SqlServerVersions.sql </dev:code><dev:remarks><maml:para> Installs only the procedures sp_Blitz and sp_BlitzWho and the table SqlServerVersions by running the corresponding scripts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Install-Core-Blitz-No-Query-Store.sql </dev:code><dev:remarks><maml:para> Installs only part of the First Responder Kit by running the official install script. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Uninstall.sql </dev:code><dev:remarks><maml:para> Uninstalls the First Responder Kit by running the official uninstall script. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaFirstResponderKit</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Install</command:verb><maml:description><maml:para>This function will help you to quickly install a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>This function will help you to quickly install a SQL Server instance on one or many computers.</maml:para><maml:para>Some of the things this function will do for you:</maml:para><maml:para>* Add your login as an admin to the new instance</maml:para><maml:para>* Search for SQL Server installations in the specified file repository</maml:para><maml:para>* Generate SA password if needed</maml:para><maml:para>* Install specific features using 'Default' and 'All' templates or cherry-pick the ones you need</maml:para><maml:para>* Set number of tempdb files based on number of cores (SQL2016+)</maml:para><maml:para>* Activate .Net 3.5 feature for SQL2012/2014</maml:para><maml:para>* Restart the machine if needed after the installation is done</maml:para><maml:para>Fully customizable installation parameters allow you to:</maml:para><maml:para>* Use existing Configuration.ini files for the installation</maml:para><maml:para>* Define service account credentials using native Powershell syntax</maml:para><maml:para>* Override any configurations by using -Configuration switch</maml:para><maml:para>* Change the TCP port after the installation is done</maml:para><maml:para>* Enable 'Perform volume maintenance tasks' for the SQL Server account</maml:para><maml:para>Note that the downloaded installation media must be extracted and available to the server where the installation runs.</maml:para><maml:para>NOTE: If no ProductID (PID) is found in the configuration files/parameters, Evaluation version is going to be installed.</maml:para><maml:para>When using CredSSP authentication, this function will try to configure CredSSP authentication for PowerShell Remoting sessions.</maml:para><maml:para>If this is not desired (e.g.: CredSSP authentication is managed externally, or is already configured appropriately,)</maml:para><maml:para>it can be disabled by setting the dbatools configuration option 'commands.initialize-credssp.bypass' value to $true.</maml:para><maml:para>To be able to configure CredSSP, the command needs to be run in an elevated PowerShell session.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaInstance</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target computer and, optionally, a new instance name and a port number. Use one of the following generic formats: Server1 Server2\Instance1 Server1\Alpha:1533, Server2\Omega:1566 "ServerName\NewInstanceName,1534" You can also define instance name and port using -InstanceName and -Port parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>SQL Server version you wish to install. This is the year version (e.g. "2008R2", "2017", "2019", "2022")</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Name of the SQL Server instance to install. Overrides the instance name specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaCredential</maml:name><maml:description><maml:para>Securely provide the password for the sa account when using mixed mode authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if SQL Server installation media is located on a network folder. Authentication will default to CredSSP if -Credential is used. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. Allowed values: 'Default', 'Basic', 'Negotiate', 'NegotiateWithImplicitCredential', 'Credssp', 'Digest', 'Kerberos'. If the protocol fails to establish a connection and explicit -Credentials were used, a failback authentication method would be attempted that configures PSSessionConfiguration on the remote machine. This method, however, is considered insecure and would, therefore, prompt an additional confirmation when used. Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationFile</maml:name><maml:description><maml:para>The path to the custom Configuration.ini file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration items that you want to use during the installation. Overrides all other parameters. For example, to define a custom server collation you can use the following parameter: PS> Install-DbaInstance -Version 2017 -Configuration @{ SQLCOLLATION = 'Latin1_General_BIN' } As long as you don't specify the item ACTION, some items are already set by the command, like SQLSYSADMINACCOUNTS or *SVCSTARTUPTYPE. If you specify the item ACTION, only INSTANCENAME and FEATURES are set based on the corresponding parameters and QUIET is set to True. You will have to set all other needed items for your specific ACTION. But this way it is possible to use the command so install a Failover Cluster Instance or even to remove a SQL Server instance. More information about how to install a Failover Cluster Instance can be found here: https://github.com/dataplat/dbatools/discussions/7447 Full list of parameters can be found here: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Install</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the folder(s) with SQL Server installation media downloaded. It will be scanned recursively for a corresponding setup.exe. Path should be available from the remote server. If a setup.exe file is missing in the repository, the installation will fail. Consider setting the following configuration in your session if you want to omit this parameter: `Set-DbatoolsConfig -Name Path.SQLServerSetup -Value '\\path\to\installations'`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Feature</maml:name><maml:description><maml:para>Features to install. Templates like "Default" and "All" can be used to setup a predefined set of components. Full list of features: Default: Engine, Replication, FullText, Tools All Engine Tools: SSMS, BackwardsCompatibility, Connectivity Replication FullText DataQuality PolyBase MachineLearning AnalysisServices ReportingServices ReportingForSharepoint SharepointAddin IntegrationServices MasterDataServices PythonPackages RPackages BackwardsCompatibility Connectivity ReplayController ReplayClient SDK BIDS SSMS: SSMS, ADV_SSMS</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AuthenticationMode</maml:name><maml:description><maml:para>Chooses authentication mode for SQL Server. Allowed values: Mixed, Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstancePath</maml:name><maml:description><maml:para>Root folder for instance components. Includes SQL Server logs, system databases, etc.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataPath</maml:name><maml:description><maml:para>Path to the Data folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogPath</maml:name><maml:description><maml:para>Path to the Log folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TempPath</maml:name><maml:description><maml:para>Path to the TempDB folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPath</maml:name><maml:description><maml:para>Path to the Backup folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateSourcePath</maml:name><maml:description><maml:para>Path to the updates that you want to slipstream into the installation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdminAccount</maml:name><maml:description><maml:para>One or more members of the sysadmin group. Uses UserName from the -Credential parameter if specified, or current Windows user by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>After successful installation, changes SQL Server TCP port to this value. Overrides the port specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Throttle</maml:name><maml:description><maml:para>Maximum number of computers updated in parallel. Once reached, the update operations will queue up. Default: 50</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProductID</maml:name><maml:description><maml:para>Product ID, or simply, serial number of your SQL Server installation, which will determine which version to install. If the PID is already built into the installation media, can be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AsCollation</maml:name><maml:description><maml:para>Collation for the Analysis Service. Default value: Latin1_General_CI_AS</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="22" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCollation</maml:name><maml:description><maml:para>Collation for the Database Engine. The default depends on the Windows locale: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support#Server-level-collations</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="23" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EngineCredential</maml:name><maml:description><maml:para>Service account of the SQL Server Database Engine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="24" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentCredential</maml:name><maml:description><maml:para>Service account of the SQL Server Agent</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="25" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ASCredential</maml:name><maml:description><maml:para>Service account of the Analysis Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="26" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ISCredential</maml:name><maml:description><maml:para>Service account of the Integration Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="27" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RSCredential</maml:name><maml:description><maml:para>Service account of the Reporting Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="28" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FTCredential</maml:name><maml:description><maml:para>Service account of the Full-Text catalog service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="29" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PBEngineCredential</maml:name><maml:description><maml:para>Service account of the PolyBase service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="30" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveConfiguration</maml:name><maml:description><maml:para>Save installation configuration file in a custom location. Will not be preserved otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformVolumeMaintenanceTasks</maml:name><maml:description><maml:para>Allow SQL Server service account to perform Volume Maintenance tasks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically if a restart is required before or after the installation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AdminAccount</maml:name><maml:description><maml:para>One or more members of the sysadmin group. Uses UserName from the -Credential parameter if specified, or current Windows user by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentCredential</maml:name><maml:description><maml:para>Service account of the SQL Server Agent</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AsCollation</maml:name><maml:description><maml:para>Collation for the Analysis Service. Default value: Latin1_General_CI_AS</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ASCredential</maml:name><maml:description><maml:para>Service account of the Analysis Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. Allowed values: 'Default', 'Basic', 'Negotiate', 'NegotiateWithImplicitCredential', 'Credssp', 'Digest', 'Kerberos'. If the protocol fails to establish a connection and explicit -Credentials were used, a failback authentication method would be attempted that configures PSSessionConfiguration on the remote machine. This method, however, is considered insecure and would, therefore, prompt an additional confirmation when used. Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AuthenticationMode</maml:name><maml:description><maml:para>Chooses authentication mode for SQL Server. Allowed values: Mixed, Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPath</maml:name><maml:description><maml:para>Path to the Backup folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration items that you want to use during the installation. Overrides all other parameters. For example, to define a custom server collation you can use the following parameter: PS> Install-DbaInstance -Version 2017 -Configuration @{ SQLCOLLATION = 'Latin1_General_BIN' } As long as you don't specify the item ACTION, some items are already set by the command, like SQLSYSADMINACCOUNTS or *SVCSTARTUPTYPE. If you specify the item ACTION, only INSTANCENAME and FEATURES are set based on the corresponding parameters and QUIET is set to True. You will have to set all other needed items for your specific ACTION. But this way it is possible to use the command so install a Failover Cluster Instance or even to remove a SQL Server instance. More information about how to install a Failover Cluster Instance can be found here: https://github.com/dataplat/dbatools/discussions/7447 Full list of parameters can be found here: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Install</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationFile</maml:name><maml:description><maml:para>The path to the custom Configuration.ini file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if SQL Server installation media is located on a network folder. Authentication will default to CredSSP if -Credential is used. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataPath</maml:name><maml:description><maml:para>Path to the Data folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EngineCredential</maml:name><maml:description><maml:para>Service account of the SQL Server Database Engine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Feature</maml:name><maml:description><maml:para>Features to install. Templates like "Default" and "All" can be used to setup a predefined set of components. Full list of features: Default: Engine, Replication, FullText, Tools All Engine Tools: SSMS, BackwardsCompatibility, Connectivity Replication FullText DataQuality PolyBase MachineLearning AnalysisServices ReportingServices ReportingForSharepoint SharepointAddin IntegrationServices MasterDataServices PythonPackages RPackages BackwardsCompatibility Connectivity ReplayController ReplayClient SDK BIDS SSMS: SSMS, ADV_SSMS</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FTCredential</maml:name><maml:description><maml:para>Service account of the Full-Text catalog service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Name of the SQL Server instance to install. Overrides the instance name specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstancePath</maml:name><maml:description><maml:para>Root folder for instance components. Includes SQL Server logs, system databases, etc.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ISCredential</maml:name><maml:description><maml:para>Service account of the Integration Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogPath</maml:name><maml:description><maml:para>Path to the Log folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the folder(s) with SQL Server installation media downloaded. It will be scanned recursively for a corresponding setup.exe. Path should be available from the remote server. If a setup.exe file is missing in the repository, the installation will fail. Consider setting the following configuration in your session if you want to omit this parameter: `Set-DbatoolsConfig -Name Path.SQLServerSetup -Value '\\path\to\installations'`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PBEngineCredential</maml:name><maml:description><maml:para>Service account of the PolyBase service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformVolumeMaintenanceTasks</maml:name><maml:description><maml:para>Allow SQL Server service account to perform Volume Maintenance tasks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>After successful installation, changes SQL Server TCP port to this value. Overrides the port specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProductID</maml:name><maml:description><maml:para>Product ID, or simply, serial number of your SQL Server installation, which will determine which version to install. If the PID is already built into the installation media, can be ignored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically if a restart is required before or after the installation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RSCredential</maml:name><maml:description><maml:para>Service account of the Reporting Services</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaCredential</maml:name><maml:description><maml:para>Securely provide the password for the sa account when using mixed mode authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveConfiguration</maml:name><maml:description><maml:para>Save installation configuration file in a custom location. Will not be preserved otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCollation</maml:name><maml:description><maml:para>Collation for the Database Engine. The default depends on the Windows locale: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support#Server-level-collations</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target computer and, optionally, a new instance name and a port number. Use one of the following generic formats: Server1 Server2\Instance1 Server1\Alpha:1533, Server2\Omega:1566 "ServerName\NewInstanceName,1534" You can also define instance name and port using -InstanceName and -Port parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TempPath</maml:name><maml:description><maml:para>Path to the TempDB folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Throttle</maml:name><maml:description><maml:para>Maximum number of computers updated in parallel. Once reached, the update operations will queue up. Default: 50</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateSourcePath</maml:name><maml:description><maml:para>Path to the updates that you want to slipstream into the installation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>SQL Server version you wish to install. This is the year version (e.g. "2008R2", "2017", "2019", "2022")</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install Author: Reitse Eskens (@2meterDBA), Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaInstance -Version 2017 -Feature All </dev:code><dev:remarks><maml:para> Install a default SQL Server instance and run the installation enabling all features with default settings. Automatically generates configuration.ini </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaInstance -SqlInstance sql2017\sqlexpress, server01 -Version 2017 -Feature Default </dev:code><dev:remarks><maml:para> Install a named SQL Server instance named sqlexpress on sql2017, and a default instance on server01. Automatically generates configuration.ini. Default features will be installed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaInstance -Version 2008R2 -SqlInstance sql2017 -ConfigurationFile C:\temp\configuration.ini </dev:code><dev:remarks><maml:para> Install a default named SQL Server instance on the remote machine, sql2017 and use the local configuration.ini </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaInstance -Version 2017 -InstancePath G:\SQLServer -UpdateSourcePath '\\my\updates' </dev:code><dev:remarks><maml:para> Run the installation locally with default settings apart from the application volume, this will be redirected to G:\SQLServer. The installation procedure would search for SQL Server updates in \\my\updates and slipstream them into the installation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $svcAcc = Get-Credential MyDomain\SvcSqlServer </dev:code><dev:remarks><maml:para> PS C:\> Install-DbaInstance -Version 2016 -InstancePath D:\Root -DataPath E: -LogPath L: -PerformVolumeMaintenanceTasks -EngineCredential $svcAcc Install SQL Server 2016 instance into D:\Root drive, set default data folder as E: and default logs folder as L:. Perform volume maintenance tasks permission is granted. MyDomain\SvcSqlServer is used as a service account for SqlServer. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $config = @{ </dev:code><dev:remarks><maml:para> >> AGTSVCSTARTUPTYPE = "Manual" >> BROWSERSVCSTARTUPTYPE = "Manual" >> FILESTREAMLEVEL = 1 >> } PS C:\> Install-DbaInstance -SqlInstance localhost\v2017:1337 -Version 2017 -SqlCollation Latin1_General_CI_AS -Configuration $config Run the installation locally with default settings overriding the value of specific configuration items. Instance name will be defined as 'v2017'; TCP port will be changed to 1337 after installation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaMaintenanceSolution</command:name><command:noun>DbaMaintenanceSolution</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Download and Install SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com)</maml:para></maml:description></command:details><maml:description><maml:para>This script will download and install the latest version of SQL Server Maintenance Solution created by Ola Hallengren</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaMaintenanceSolution</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance onto which the Maintenance Solution will be installed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where Ola Hallengren's solution will be installed. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupLocation</maml:name><maml:description><maml:para>Location of the backup root directory. If this is not supplied, the default backup directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CleanupTime</maml:name><maml:description><maml:para>Time in hours, after which backup files are deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileDirectory</maml:name><maml:description><maml:para>Specify the output file directory where the Maintenance Solution will write to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceExisting</maml:name><maml:description><maml:para>If this switch is enabled, objects already present in the target database will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogToTable</maml:name><maml:description><maml:para>If this switch is enabled, the Maintenance Solution will be configured to log commands to a table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Solution</maml:name><maml:description><maml:para>Specifies which portion of the Maintenance solution to install. Valid values are All (full solution), Backup, IntegrityCheck and IndexOptimize.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallJobs</maml:name><maml:description><maml:para>If this switch is enabled, the corresponding SQL Agent Jobs will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install Ola's solution from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/olahallengren/sql-server-maintenance-solution</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Ola's solution will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallParallel</maml:name><maml:description><maml:para>If this switch is enabled, the Queue and QueueDatabase tables are created, for use when @DatabasesInParallel = 'Y' are set in the jobs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupLocation</maml:name><maml:description><maml:para>Location of the backup root directory. If this is not supplied, the default backup directory will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CleanupTime</maml:name><maml:description><maml:para>Time in hours, after which backup files are deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where Ola Hallengren's solution will be installed. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Ola's solution will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallJobs</maml:name><maml:description><maml:para>If this switch is enabled, the corresponding SQL Agent Jobs will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallParallel</maml:name><maml:description><maml:para>If this switch is enabled, the Queue and QueueDatabase tables are created, for use when @DatabasesInParallel = 'Y' are set in the jobs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install Ola's solution from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/olahallengren/sql-server-maintenance-solution</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogToTable</maml:name><maml:description><maml:para>If this switch is enabled, the Maintenance Solution will be configured to log commands to a table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileDirectory</maml:name><maml:description><maml:para>Specify the output file directory where the Maintenance Solution will write to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceExisting</maml:name><maml:description><maml:para>If this switch is enabled, objects already present in the target database will be dropped and recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Solution</maml:name><maml:description><maml:para>Specifies which portion of the Maintenance solution to install. Valid values are All (full solution), Backup, IntegrityCheck and IndexOptimize.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance onto which the Maintenance Solution will be installed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, OlaHallengren Author: Viorel Ciucu, cviorel.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://ola.hallengren.com </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -CleanupTime 72 </dev:code><dev:remarks><maml:para> Installs Ola Hallengren's Solution objects on RES14224 in the DBA database. Backups will default to the default Backup Directory. If the Maintenance Solution already exists, the script will be halted. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -BackupLocation "Z:\SQLBackup" -CleanupTime 72 </dev:code><dev:remarks><maml:para> This will create the Ola Hallengren's Solution objects. Existing objects are not affected in any way. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = 'MyServer' >> Database = 'maintenance' >> ReplaceExisting = $true >> InstallJobs = $true >> LogToTable = $true >> BackupLocation = 'C:\Data\Backup' >> CleanupTime = 65 >> Verbose = $true >> } >> Install-DbaMaintenanceSolution @params Installs Maintenance Solution to myserver in database. Adds Agent Jobs, and if any currently exist, they'll be replaced. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -BackupLocation "Z:\SQLBackup" -CleanupTime 72 -ReplaceExisting </dev:code><dev:remarks><maml:para> This will drop and then recreate the Ola Hallengren's Solution objects The cleanup script will drop and recreate: - TABLE [dbo].[CommandLog] - STORED PROCEDURE [dbo].[CommandExecute] - STORED PROCEDURE [dbo].[DatabaseBackup] - STORED PROCEDURE [dbo].[DatabaseIntegrityCheck] - STORED PROCEDURE [dbo].[IndexOptimize] The following SQL Agent jobs will be deleted: - 'Output File Cleanup' - 'IndexOptimize - USER_DATABASES' - 'sp_delete_backuphistory' - 'DatabaseBackup - USER_DATABASES - LOG' - 'DatabaseBackup - SYSTEM_DATABASES - FULL' - 'DatabaseBackup - USER_DATABASES - FULL' - 'sp_purge_jobhistory' - 'DatabaseIntegrityCheck - SYSTEM_DATABASES' - 'CommandLog Cleanup' - 'DatabaseIntegrityCheck - USER_DATABASES' - 'DatabaseBackup - USER_DATABASES - DIFF' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -InstallParallel </dev:code><dev:remarks><maml:para> This will create the Queue and QueueDatabase tables for uses when manually changing jobs to use the @DatabasesInParallel = 'Y' flag </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaMaintenanceSolution</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaMultiTool</command:name><command:noun>DbaMultiTool</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Installs or updates the DBA MultiTool stored procedures.</maml:para></maml:description></command:details><maml:description><maml:para>Downloads, extracts and installs the DBA MultiTool stored procedures.</maml:para><maml:para>DBA MultiTool links:</maml:para><maml:para>https://dba-multitool.org</maml:para><maml:para>https://github.com/LowlyDBA/dba-multitool/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaMultiTool</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of the DBA MultiTool to install. Allowed values: main (default) development</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install DBA MultiTool stored procedures into.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install DBA MultiTool from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/LowlyDBA/dba-multitool/.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the DBA MultiTool will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies an alternate branch of the DBA MultiTool to install. Allowed values: main (default) development</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install DBA MultiTool stored procedures into.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the DBA MultiTool will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install DBA MultiTool from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/LowlyDBA/dba-multitool/.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, DbaMultiTool Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://dba-multitool.org </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMultiTool -SqlInstance server1 -Database main </dev:code><dev:remarks><maml:para> Logs into server1 with Windows authentication and then installs the DBA MultiTool in the main database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMultiTool -SqlInstance server1\instance1 -Database DBA </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with Windows authentication and then installs the DBA MultiTool in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMultiTool -SqlInstance server1\instance1 -Database main -SqlCredential $cred </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with SQL authentication and then installs the DBA MultiTool in the main database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMultiTool -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 </dev:code><dev:remarks><maml:para> Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the DBA MultiTool in the main database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Install-DbaMultiTool Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the DBA MultiTool in the main database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMultiTool -SqlInstance sql2016 -Branch development </dev:code><dev:remarks><maml:para> Installs the development branch version of the DBA MultiTool in the main database on sql2016 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaMultiTool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaSqlWatch</command:name><command:noun>DbaSqlWatch</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Installs or updates SqlWatch.</maml:para></maml:description></command:details><maml:description><maml:para>Downloads, extracts and installs or updates SqlWatch.</maml:para><maml:para>https://sqlwatch.io/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaSqlWatch</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install SqlWatch into. Defaults to SQLWATCH.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install SqlWatch from. This *should* be the zipfile as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/marcingminski/sqlwatch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PreRelease</maml:name><maml:description><maml:para>If specified, a pre-release (beta) will be downloaded rather than a stable release</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, SqlWatch will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install SqlWatch into. Defaults to SQLWATCH.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, SqlWatch will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install SqlWatch from. This *should* be the zipfile as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/marcingminski/sqlwatch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PreRelease</maml:name><maml:description><maml:para>If specified, a pre-release (beta) will be downloaded rather than a stable release</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, SqlWatch Author: Ken K (github.com/koglerk) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://sqlwatch.io </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaSqlWatch -SqlInstance server1 </dev:code><dev:remarks><maml:para> Logs into server1 with Windows authentication and then installs SqlWatch in the SQLWATCH database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaSqlWatch -SqlInstance server1\instance1 -Database DBA </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with Windows authentication and then installs SqlWatch in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaSqlWatch -SqlInstance server1\instance1 -Database DBA -SqlCredential $cred </dev:code><dev:remarks><maml:para> Logs into server1\instance1 with SQL authentication and then installs SqlWatch in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaSqlWatch -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014 </dev:code><dev:remarks><maml:para> Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs SqlWatch in the SQLWATCH database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" </dev:code><dev:remarks><maml:para> $servers | Install-DbaSqlWatch Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs SqlWatch in the SQLWATCH database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaSqlWatch</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbatoolsWatchUpdate</command:name><command:noun>DbatoolsWatchUpdate</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Adds the scheduled task to support Watch-DbaUpdate.</maml:para></maml:description></command:details><maml:description><maml:para>Adds the scheduled task to support Watch-DbaUpdate.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbatoolsWatchUpdate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskName</maml:name><maml:description><maml:para>Provide custom name for the Scheduled Task</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TaskName</maml:name><maml:description><maml:para>Provide custom name for the Scheduled Task</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Watcher Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbatoolsWatchUpdate </dev:code><dev:remarks><maml:para> Adds the scheduled task needed by Watch-DbaUpdate </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbatoolsWatchUpdate -TaskName MyScheduledTask </dev:code><dev:remarks><maml:para> Will create the scheduled task as the name MyScheduledTask </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbatoolsWatchUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Install-DbaWhoIsActive</command:name><command:noun>DbaWhoIsActive</command:noun><command:verb>Install</command:verb><maml:description><maml:para>Automatically installs or updates sp_WhoisActive by Adam Machanic.</maml:para></maml:description></command:details><maml:description><maml:para>This command downloads, extracts and installs sp_WhoisActive with Adam's 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</maml:para><maml:para>Please consider donating to Adam if you find this stored procedure helpful: http://tinyurl.com/WhoIsActiveDonate</maml:para><maml:para>Note that you will be prompted a bunch of times to confirm an action.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Install-DbaWhoIsActive</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install sp_WhoisActive from. This can be either the zip file as distributed by the website or the expanded SQL script. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/amachanic/sp_whoisactive/releases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to install sp_WhoisActive into. This parameter is mandatory when executing this command unattended.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, then sp_WhoisActive will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to install sp_WhoisActive into. This parameter is mandatory when executing this command unattended.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, then sp_WhoisActive will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install sp_WhoisActive from. This can be either the zip file as distributed by the website or the expanded SQL script. If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/amachanic/sp_whoisactive/releases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, WhoIsActive Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT http://whoisactive.com </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master </dev:code><dev:remarks><maml:para> Downloads sp_WhoisActive from the internet and installs to sqlserver2014a's master database. Connects to SQL Server using Windows Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaWhoIsActive -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Pops up a dialog box asking which database on sqlserver2014a you want to install the procedure into. Connects to SQL Server using SQL Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master -LocalFile c:\SQLAdmin\sp_WhoIsActive.sql </dev:code><dev:remarks><maml:para> Installs sp_WhoisActive to sqlserver2014a's master database from the local file sp_WhoIsActive.sql. You can download this file from https://github.com/amachanic/sp_whoisactive/blob/master/sp_WhoIsActive.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master -LocalFile c:\SQLAdmin\sp_whoisactive-12.00.zip </dev:code><dev:remarks><maml:para> Installs sp_WhoisActive to sqlserver2014a's master database from the local file sp_whoisactive-12.00.zip. You can download this file from https://github.com/amachanic/sp_whoisactive/releases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $instances = Get-DbaRegServer sqlserver </dev:code><dev:remarks><maml:para> PS C:\> Install-DbaWhoIsActive -SqlInstance $instances -Database master Installs sp_WhoisActive to all servers within CMS </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Install-DbaWhoIsActive</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaAdvancedInstall</command:name><command:noun>DbaAdvancedInstall</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Designed for internal use, implements parallel execution for Install-DbaInstance.</maml:para></maml:description></command:details><maml:description><maml:para>Invokes an install process for a single computer and restarts it if needed</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaAdvancedInstall</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Instance name to be used for the installation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>After successful installation, changes SQL Server TCP port to this value. Overrides the port specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</command:parameterValue><dev:type><maml:name>System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallationPath</maml:name><maml:description><maml:para>Path to setup.exe</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationPath</maml:name><maml:description><maml:para>Path to Configuration.ini on a local machine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>Array of command line arguments for setup.exe</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>Canonic version of SQL Server, e.g. 10.50, 11.0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Version</command:parameterValue><dev:type><maml:name>Version</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration items that you want to use during the installation. Overrides all other parameters. For example, to define a custom server collation you can use the following parameter: PS> Install-DbaInstance -Version 2017 -Configuration @{ SQLCOLLATION = 'Latin1_General_BIN' } Full list of parameters can be found here: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Install</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of Sql Server and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 instance, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformVolumeMaintenanceTasks</maml:name><maml:description><maml:para>Allow SQL Server service account to perform Volume Maintenance tasks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveConfiguration</maml:name><maml:description><maml:para>Save installation configuration file in a custom location. Will not be preserved otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. If the protocol fails to establish a connection Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if installation media is located on a network folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaCredential</maml:name><maml:description><maml:para>Securely provide the password for the sa account when using mixed mode authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>Array of command line arguments for setup.exe</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. If the protocol fails to establish a connection Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration items that you want to use during the installation. Overrides all other parameters. For example, to define a custom server collation you can use the following parameter: PS> Install-DbaInstance -Version 2017 -Configuration @{ SQLCOLLATION = 'Latin1_General_BIN' } Full list of parameters can be found here: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Install</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationPath</maml:name><maml:description><maml:para>Path to Configuration.ini on a local machine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if installation media is located on a network folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstallationPath</maml:name><maml:description><maml:para>Path to setup.exe</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Instance name to be used for the installation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformVolumeMaintenanceTasks</maml:name><maml:description><maml:para>Allow SQL Server service account to perform Volume Maintenance tasks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>After successful installation, changes SQL Server TCP port to this value. Overrides the port specified in -SqlInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</command:parameterValue><dev:type><maml:name>System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of Sql Server and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 instance, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaCredential</maml:name><maml:description><maml:para>Securely provide the password for the sa account when using mixed mode authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveConfiguration</maml:name><maml:description><maml:para>Save installation configuration file in a custom location. Will not be preserved otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>Canonic version of SQL Server, e.g. 10.50, 11.0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Version</command:parameterValue><dev:type><maml:name>Version</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install, Patching Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaAdvancedUpdate -ComputerName SQL1 -Action $actions </dev:code><dev:remarks><maml:para> Invokes update actions on SQL1 after restarting it. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaAdvancedInstall</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaAdvancedRestore</command:name><command:noun>DbaAdvancedRestore</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Allows the restore of modified BackupHistory Objects For 90% of users Restore-DbaDatabase should be your point of access to this function. The other 10% use it at their own risk</maml:para></maml:description></command:details><maml:description><maml:para>This is the final piece in the Restore-DbaDatabase Stack. Usually a BackupHistory object will arrive here from `Restore-DbaDatabase` via the following pipeline:</maml:para><maml:para>`Get-DbaBackupInformation | Select-DbaBackupInformation | Format-DbaBackupInformation | Test-DbaBackupInformation | Invoke-DbaAdvancedRestore`</maml:para><maml:para>We have exposed these functions publicly to allow advanced users to perform operations that we don't support, or won't add as they would make things too complex for the majority of our users</maml:para><maml:para>For 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`</maml:para><maml:para>We would recommend ALWAYS pushing your input through `Test-DbaBackupInformation` just to make sure that it makes sense to us.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaAdvancedRestore</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>The BackupHistory object to be restored. Can be passed in on the pipeline</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SqlInstance to which the backups should be restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>If set, the restore will not be performed, but the T-SQL scripts to perform it will be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>If set, performs a Verify of the backups rather than a full restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>Point in Time to which the database should be restored. This should be the same value or earlier, as used in the previous pipeline stages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>A folder path where a standby file should be created to put the recovered databases in a standby mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Leave the database in a restoring state so that further restore may be made</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple by 64kb</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5kb,1kb,2kb,4kb,8kb,16kb,32kb or 64kb Can be specified in bytes Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Indicates that the restore is continuing a restore, so target database must be in Recovering or Standby states When specified, WithReplace will be set to true</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>AzureCredential required to connect to blob storage holding the backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>Indicated that if the database already exists it should be replaced</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be restored as part of the database restore operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be restored as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestore</maml:name><maml:description><maml:para>The output from Get-DbaSuspect page containing the suspect pages to be restored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExecuteAs</maml:name><maml:description><maml:para>If set, this will cause the database(s) to be restored (and therefore owned) as the SA user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Mark in the transaction log to stop the restore at</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>AzureCredential required to connect to blob storage holding the backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>The BackupHistory object to be restored. Can be passed in on the pipeline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5kb,1kb,2kb,4kb,8kb,16kb,32kb or 64kb Can be specified in bytes Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Indicates that the restore is continuing a restore, so target database must be in Recovering or Standby states When specified, WithReplace will be set to true</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Replaces user friendly yellow warnings with bloody red exceptions of doom! Use this if you want the function to throw terminating errors you want to catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExecuteAs</maml:name><maml:description><maml:para>If set, this will cause the database(s) to be restored (and therefore owned) as the SA user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be restored as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be restored as part of the database restore operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple by 64kb</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Leave the database in a restoring state so that further restore may be made</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>If set, the restore will not be performed, but the T-SQL scripts to perform it will be returned</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestore</maml:name><maml:description><maml:para>The output from Get-DbaSuspect page containing the suspect pages to be restored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>Point in Time to which the database should be restored. This should be the same value or earlier, as used in the previous pipeline stages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SqlInstance to which the backups should be restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>A folder path where a standby file should be created to put the recovered databases in a standby mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Mark in the transaction log to stop the restore at</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>If set, performs a Verify of the backups rather than a full restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>Indicated that if the database already exists it should be replaced</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Restore, Backup Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance </dev:code><dev:remarks><maml:para> Will restore all the backups in the BackupHistory object according to the transformations it contains </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance -OutputScriptOnly </dev:code><dev:remarks><maml:para> PS C:\> $BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance First 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 the backup files again </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaAdvancedRestore</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaAdvancedUpdate</command:name><command:noun>DbaAdvancedUpdate</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Designed for internal use, implements parallel execution for Update-DbaInstance.</maml:para></maml:description></command:details><maml:description><maml:para>Invokes an update process for a single computer and restarts it if needed</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaAdvancedUpdate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>An object containing the action plan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of a patch and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 patch on a computer, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. If the protocol fails to establish a connection Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if update Repository is located on a network folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtractPath</maml:name><maml:description><maml:para>Lets you specify a location to extract the update file to on the system requiring the update. e.g. C:\temp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>A list of extra arguments to pass to the execution file. Accepts one or more strings containing command line parameters. Example: ... -ArgumentList "/SkipRules=RebootRequiredCheck", "/Q"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>An object containing the action plan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>A list of extra arguments to pass to the execution file. Accepts one or more strings containing command line parameters. Example: ... -ArgumentList "/SkipRules=RebootRequiredCheck", "/Q"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. If the protocol fails to establish a connection Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if update Repository is located on a network folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtractPath</maml:name><maml:description><maml:para>Lets you specify a location to extract the update file to on the system requiring the update. e.g. C:\temp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of a patch and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 patch on a computer, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Bool</command:parameterValue><dev:type><maml:name>Bool</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install, Patching, Update Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaAdvancedUpdate -ComputerName SQL1 -Action $actions </dev:code><dev:remarks><maml:para> Invokes update actions on SQL1 after restarting it. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaAdvancedUpdate -ComputerName SQL1 -Action $actions -ExtractPath C:\temp </dev:code><dev:remarks><maml:para> Extracts required files to the specific location "C:\temp". Invokes update actions on SQL1 after restarting it. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaAdvancedUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaAgFailover</command:name><command:noun>DbaAgFailover</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Failover an availability group.</maml:para></maml:description></command:details><maml:description><maml:para>Failover an availability group.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaAgFailover</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only failover specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Force Failover and allow data loss</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only failover specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Force Failover and allow data loss</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaAgFailover -SqlInstance sql2017 -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> Safely (no potential data loss) fails over the SharePoint AG to sql2017. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2017 | Out-GridView -Passthru | Invoke-DbaAgFailover -Confirm:$false </dev:code><dev:remarks><maml:para> Safely (no potential data loss) fails over the selected availability groups to sql2017. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaAgFailover -SqlInstance sql2017 -AvailabilityGroup SharePoint -Force </dev:code><dev:remarks><maml:para> Forcefully (with potential data loss) fails over the SharePoint AG to sql2017. Prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaAgFailover</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaBalanceDataFiles</command:name><command:noun>DbaBalanceDataFiles</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Re-balance data between data files</maml:para></maml:description></command:details><maml:description><maml:para>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's about the same size.</maml:para><maml:para>You may want to balance the data between all the data files.</maml:para><maml:para>The function will check the server version and edition to see if the it allows for online index rebuilds.</maml:para><maml:para>If the server does support it, it will try to rebuild the index online.</maml:para><maml:para>If the server doesn't support it, it will rebuild the index offline. Be carefull though, this can cause downtime</maml:para><maml:para>The tables must have a clustered index to be able to balance out the data.</maml:para><maml:para>The function does NOT yet support heaps.</maml:para><maml:para>The function will also check if the file groups are subject to balance out.</maml:para><maml:para>A file group would have at least have 2 data files and should be writable.</maml:para><maml:para>If a table is within such a file group it will be subject for processing. If not the table will be skipped.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaBalanceDataFiles</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The tables(s) of the database to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RebuildOffline</maml:name><maml:description><maml:para>Will set all the indexes to rebuild offline. This option is also needed when the server version is below 2005.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>This will disable the check for enough disk space for the action to be successful. Use this with caution!!</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-DbaBalanceDataFiles</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The tables(s) of the database to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RebuildOffline</maml:name><maml:description><maml:para>Will set all the indexes to rebuild offline. This option is also needed when the server version is below 2005.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>This will disable the check for enough disk space for the action to be successful. Use this with caution!!</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>This will disable the check for enough disk space for the action to be successful. Use this with caution!!</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RebuildOffline</maml:name><maml:description><maml:para>Will set all the indexes to rebuild offline. This option is also needed when the server version is below 2005.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The tables(s) of the database to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, FileManagement, File, Utility Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 </dev:code><dev:remarks><maml:para> This command will distribute the data in database db1 on instance sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 | Select-Object -ExpandProperty DataFilesEnd </dev:code><dev:remarks><maml:para> This command will distribute the data in database db1 on instance sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 -Table table1,table2,table5 </dev:code><dev:remarks><maml:para> This command will distribute the data for only the tables table1,table2 and table5 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaBalanceDataFiles -SqlInstance sql1 -Database db1 -RebuildOffline </dev:code><dev:remarks><maml:para> This command will consider the fact that there might be a SQL Server edition that does not support online rebuilds of indexes. By supplying this parameter you give permission to do the rebuilds offline if the edition does not support it. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaBalanceDataFiles</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaCycleErrorLog</command:name><command:noun>DbaCycleErrorLog</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Cycles the current instance or agent log.</maml:para></maml:description></command:details><maml:description><maml:para>Cycles the current error log for the instance (SQL Server) and/or SQL Server Agent.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaCycleErrorLog</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The log to cycle. Accepts: instance or agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The log to cycle. Accepts: instance or agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, ErrorLog, Logging Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaCycleLog -SqlInstance sql2016 -Type agent </dev:code><dev:remarks><maml:para> Cycles the current error log for the SQL Server Agent on SQL Server instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaCycleLog -SqlInstance sql2016 -Type instance </dev:code><dev:remarks><maml:para> Cycles the current error log for the SQL Server instance on SQL Server instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaCycleLog -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Cycles the current error log for both SQL Server instance and SQL Server Agent on SQL Server instance sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaCycleErrorLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbccDropCleanBuffer</command:name><command:noun>DbaDbccDropCleanBuffer</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC DROPCLEANBUFFERS</maml:para></maml:description></command:details><maml:description><maml:para>Allows execution of Database Console Command DBCC DROPCLEANBUFFERS</maml:para><maml:para>Removes all clean buffers from the buffer pool, and columnstore objects from the columnstore object pool.</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-dropcleanbuffers-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbccDropCleanBuffer</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccDropCleanBuffer -SqlInstance SqlServer2017 </dev:code><dev:remarks><maml:para> Runs the command DBCC DROPCLEANBUFFERS against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccDropCleanBuffer -SqlInstance SqlServer2017 -NoInformationalMessages </dev:code><dev:remarks><maml:para> Runs the command DBCC DROPCLEANBUFFERS WITH NO_INFOMSGS against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Invoke-DbaDbccDropCleanBuffer -WhatIf </dev:code><dev:remarks><maml:para> Displays what will happen if command DBCC DROPCLEANBUFFERS is called against Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaDbccDropCleanBuffer -SqlInstance Server1 -SqlCredential $cred Connects using sqladmin credential and executes command DBCC DROPCLEANBUFFERS for instance Server1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbccDropCleanBuffer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbccFreeCache</command:name><command:noun>DbaDbccFreeCache</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Execution of Database Console Commands that clear Server level Memory caches</maml:para></maml:description></command:details><maml:description><maml:para>Allows execution of Database Console Commands that act at Server Level to clear Memory caches</maml:para><maml:para>Allows execution of the following commands</maml:para><maml:para> DBCC FREEPROCCACHE</maml:para><maml:para> DBCC FREESESSIONCACHE</maml:para><maml:para> DBCC FREESYSTEMCACHE</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-freeproccache-transact-sql</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-freesessioncache-transact-sql</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-freesystemcache-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbccFreeCache</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operation</maml:name><maml:description><maml:para>DBCC Operation to Perform - Supports specific set of operations</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputValue</maml:name><maml:description><maml:para>Value used for Operation - meaning depends on Operation DBCC FREEPROCCACHE accepts a plan_handle of type varbinary(64) a sql_handle of type varbinary(64) or the name of a Resource Governor resource pool of type sysname If blank then clears all elements from the plan cache DBCC FREESYSTEMCACHE accepts 'ALL' for ALL specifies all supported caches or name of a Resource Governor pool cache Not required for other values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MarkInUseForRemoval</maml:name><maml:description><maml:para>Used when Operation = DBCC FREESYSTEMCACHE Asynchronously frees currently used entries from their respective caches after they become unused</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputValue</maml:name><maml:description><maml:para>Value used for Operation - meaning depends on Operation DBCC FREEPROCCACHE accepts a plan_handle of type varbinary(64) a sql_handle of type varbinary(64) or the name of a Resource Governor resource pool of type sysname If blank then clears all elements from the plan cache DBCC FREESYSTEMCACHE accepts 'ALL' for ALL specifies all supported caches or name of a Resource Governor pool cache Not required for other values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MarkInUseForRemoval</maml:name><maml:description><maml:para>Used when Operation = DBCC FREESYSTEMCACHE Asynchronously frees currently used entries from their respective caches after they become unused</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operation</maml:name><maml:description><maml:para>DBCC Operation to Perform - Supports specific set of operations</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREEPROCCACHE </dev:code><dev:remarks><maml:para> Runs the command DBCC FREEPROCCACHE against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREESESSIONCACHE -NoInformationalMessages </dev:code><dev:remarks><maml:para> Runs the command DBCC FREESESSIONCACHE WITH NO_INFOMSGS against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREESYSTEMCACHE -NoInformationalMessages </dev:code><dev:remarks><maml:para> Runs the command DBCC FREESYSTEMCACHE WITH NO_INFOMSGS against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREEPROCCACHE -InputValue 0x060006001ECA270EC0215D05000000000000000000000000 </dev:code><dev:remarks><maml:para> Remove a specific plan with plan_handle 0x060006001ECA270EC0215D05000000000000000000000000 from the cache via the command DBCC FREEPROCCACHE(0x060006001ECA270EC0215D05000000000000000000000000) against the instance SqlServer2017 using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREEPROCCACHE -InputValue default </dev:code><dev:remarks><maml:para> Runs the command DBCC FREEPROCCACHE('default') against the instance SqlServer2017 using Windows Authentication. This clears all cache entries associated with a resource pool 'default'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREESYSTEMCACHE -InputValue default </dev:code><dev:remarks><maml:para> Runs the command DBCC FREESYSTEMCACHE ('ALL', default) against the instance SqlServer2017 using Windows Authentication. This will clean all the caches with entries specific to the resource pool named "default". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbccFreeCache -SqlInstance SqlServer2017 -Operation FREESYSTEMCACHE -InputValue default -MarkInUseForRemoval </dev:code><dev:remarks><maml:para> Runs the command DBCC FREESYSTEMCACHE ('ALL', default) WITH MARK_IN_USE_FOR_REMOVAL against the instance SqlServer2017 using Windows Authentication. This will to release entries once the entries become unused for all the caches with entries specific to the resource pool named "default". </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbccFreeCache</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbClone</command:name><command:noun>DbaDbClone</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Clones a database schema and statistics</maml:para></maml:description></command:details><maml:description><maml:para>Clones a database schema and statistics.</maml:para><maml:para>This can be useful for testing query performance without requiring all the space needed for the data in the database.</maml:para><maml:para>Read more:</maml:para><maml:para> - https://sqlperformance.com/2016/08/sql-statistics/expanding-dbcc-clonedatabase</maml:para><maml:para> - https://support.microsoft.com/en-us/help/3177838/how-to-use-dbcc-clonedatabase-to-generate-a-schema-and-statistics-only</maml:para><maml:para>Thanks to Microsoft Tiger Team for the code and idea https://github.com/Microsoft/tigertoolbox/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbClone</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to clone - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CloneDatabase</maml:name><maml:description><maml:para>The name(s) to clone to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeStatistics</maml:name><maml:description><maml:para>Exclude the statistics in the cloned database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQueryStore</maml:name><maml:description><maml:para>Exclude the QueryStore data in the cloned database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>Update the statistics prior to cloning (per Microsoft Tiger Team formula)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CloneDatabase</maml:name><maml:description><maml:para>The name(s) to clone to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to clone - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQueryStore</maml:name><maml:description><maml:para>Exclude the QueryStore data in the cloned database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeStatistics</maml:name><maml:description><maml:para>Exclude the statistics in the cloned database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UpdateStatistics</maml:name><maml:description><maml:para>Update the statistics prior to cloning (per Microsoft Tiger Team formula)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Statistics, Performance, Clone Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbClone -SqlInstance sql2016 -Database mydb -CloneDatabase myclone </dev:code><dev:remarks><maml:para> Clones mydb to myclone on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database mydb | Invoke-DbaDbClone -CloneDatabase myclone, myclone2 -UpdateStatistics </dev:code><dev:remarks><maml:para> Updates the statistics of mydb then clones to myclone and myclone2 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbClone</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDataGenerator</command:name><command:noun>DbaDbDataGenerator</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Invoke-DbaDbDataGenerator generates random data for tables</maml:para></maml:description></command:details><maml:description><maml:para>Invoke-DbaDbDataMasking is able to generate random data for tables.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDataGenerator</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Configuration file that contains the which tables and columns need to be masked</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude specific tables even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude specific columns even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>Force a max length of strings instead of relying on datatype maxes. Note if a string datatype has a lower MaxValue, that will be used instead. Useful for adhoc updates and testing, otherwise, the config file should be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExactLength</maml:name><maml:description><maml:para>Mask string values to the same length. So 'Tate' will be replaced with 4 random characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModulusFactor</maml:name><maml:description><maml:para>Calculating the next nullable by using the remainder from the modulus. Default is every 10.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExactLength</maml:name><maml:description><maml:para>Mask string values to the same length. So 'Tate' will be replaced with 4 random characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude specific columns even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude specific tables even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Configuration file that contains the which tables and columns need to be masked</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>Force a max length of strings instead of relying on datatype maxes. Note if a string datatype has a lower MaxValue, that will be used instead. Useful for adhoc updates and testing, otherwise, the config file should be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModulusFactor</maml:name><maml:description><maml:para>Calculating the next nullable by using the remainder from the modulus. Default is every 10.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDataGenerator -SqlInstance sqldb2 -Database DB1 -FilePath C:\temp\sqldb1.db1.tables.json </dev:code><dev:remarks><maml:para> Apply the data generation configuration from the file "sqldb1.db1.tables.json" to the db1 database on sqldb2. Prompt for confirmation for each table. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDataGenerator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDataMasking</command:name><command:noun>DbaDbDataMasking</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Masks data by using randomized values determined by a configuration file and a randomizer framework</maml:para></maml:description></command:details><maml:description><maml:para>TMasks data by using randomized values determined by a configuration file and a randomizer framework</maml:para><maml:para>It will use a configuration file that can be made manually or generated using New-DbaDbMaskingConfig</maml:para><maml:para>Note that the following column and data types are not currently supported:</maml:para><maml:para>Identity</maml:para><maml:para>ForeignKey</maml:para><maml:para>Computed</maml:para><maml:para>Hierarchyid</maml:para><maml:para>Geography</maml:para><maml:para>Geometry</maml:para><maml:para>Xml</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDataMasking</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Configuration file that contains the which tables and columns need to be masked</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude specific tables even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude specific columns even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>Force a max length of strings instead of relying on datatype maxes. Note if a string datatype has a lower MaxValue, that will be used instead. Useful for adhoc updates and testing, otherwise, the config file should be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModulusFactor</maml:name><maml:description><maml:para>Calculating the next nullable by using the remainder from the modulus. Default is every 10.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExactLength</maml:name><maml:description><maml:para>Mask string values to the same length. So 'Tate' will be replaced with 4 random characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandTimeout</maml:name><maml:description><maml:para>Timeout for the database connection in seconds. Default is 300.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Size of the batch to use to write the masked data back to the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Retry</maml:name><maml:description><maml:para>The amount of retries to generate a unique row for a table. Default is 1000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DictionaryFilePath</maml:name><maml:description><maml:para>Import the dictionary to be used in in the database masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DictionaryExportPath</maml:name><maml:description><maml:para>Export the dictionary to the given path. Naming convention will be [computername]_[instancename]_[database]_Dictionary.csv Be careful with this feature, this export is the key to get the original values which is a security risk!</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Size of the batch to use to write the masked data back to the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandTimeout</maml:name><maml:description><maml:para>Timeout for the database connection in seconds. Default is 300.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DictionaryExportPath</maml:name><maml:description><maml:para>Export the dictionary to the given path. Naming convention will be [computername]_[instancename]_[database]_Dictionary.csv Be careful with this feature, this export is the key to get the original values which is a security risk!</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DictionaryFilePath</maml:name><maml:description><maml:para>Import the dictionary to be used in in the database masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExactLength</maml:name><maml:description><maml:para>Mask string values to the same length. So 'Tate' will be replaced with 4 random characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude specific columns even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude specific tables even if it's listed in the config file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Configuration file that contains the which tables and columns need to be masked</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>Force a max length of strings instead of relying on datatype maxes. Note if a string datatype has a lower MaxValue, that will be used instead. Useful for adhoc updates and testing, otherwise, the config file should be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ModulusFactor</maml:name><maml:description><maml:para>Calculating the next nullable by using the remainder from the modulus. Default is every 10.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Retry</maml:name><maml:description><maml:para>The amount of retries to generate a unique row for a table. Default is 1000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Masking, DataMasking Author: Sander Stad (@sqlstad, sqlstad.nl) | Chrissy LeMaire (@cl, netnerds.net) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDataMasking -SqlInstance SQLDB2 -Database DB1 -FilePath C:\Temp\sqldb1.db1.tables.json </dev:code><dev:remarks><maml:para> Apply the data masking configuration from the file "sqldb1.db1.tables.json" to the db1 database on sqldb2. Prompt for confirmation for each table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem -Path C:\Temp\sqldb1.db1.tables.json | Invoke-DbaDbDataMasking -SqlInstance SQLDB2 -Database DB1 -Confirm:$false </dev:code><dev:remarks><maml:para> Apply the data masking configuration from the file "sqldb1.db1.tables.json" to the db1 database on sqldb2. Do not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMaskingConfig -SqlInstance SQLDB1 -Database DB1 -Path C:\Temp\clone -OutVariable file </dev:code><dev:remarks><maml:para> $file | Invoke-DbaDbDataMasking -SqlInstance SQLDB2 -Database DB1 -Confirm:$false Create the data masking configuration file "sqldb1.db1.tables.json", then use it to mask the db1 database on sqldb2. Do not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem -Path C:\Temp\sqldb1.db1.tables.json | Invoke-DbaDbDataMasking -SqlInstance SQLDB2, sqldb3 -Database DB1 -Confirm:$false </dev:code><dev:remarks><maml:para> See what would happen if you the data masking configuration from the file "sqldb1.db1.tables.json" to the db1 database on sqldb2 and sqldb3. Do not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDataMasking</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDbccCheckConstraint</command:name><command:noun>DbaDbDbccCheckConstraint</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC CHECKCONSTRAINTS</maml:para></maml:description></command:details><maml:description><maml:para>Executes the command DBCC CHECKCONSTRAINTS and returns results</maml:para><maml:para>Reports and corrects pages and row count inaccuracies in the catalog views.</maml:para><maml:para>These inaccuracies may cause incorrect space usage reports returned by the sp_spaceused system stored procedure.</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkconstraints-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDbccCheckConstraint</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table or constraint to be checked. When table_name or table_id is specified, all enabled constraints on that table are checked. When constraint_name or constraint_id is specified, only that constraint is checked. If neither a table identifier nor a constraint identifier is specified, all enabled constraints on all tables in the current database are checked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllConstraints</maml:name><maml:description><maml:para>Checks all enabled and disabled constraints on the table if the table name is specified or if all tables are checked; Otherwise, checks only the enabled constraint. Has no effect when a constraint is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllErrorMessages</maml:name><maml:description><maml:para>Returns all rows that violate constraints in the table that is checked. The default is the first 200 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllConstraints</maml:name><maml:description><maml:para>Checks all enabled and disabled constraints on the table if the table name is specified or if all tables are checked; Otherwise, checks only the enabled constraint. Has no effect when a constraint is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllErrorMessages</maml:name><maml:description><maml:para>Returns all rows that violate constraints in the table that is checked. The default is the first 200 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table or constraint to be checked. When table_name or table_id is specified, all enabled constraints on that table are checked. When constraint_name or constraint_id is specified, only that constraint is checked. If neither a table identifier nor a constraint identifier is specified, all enabled constraints on all tables in the current database are checked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCheckConstraint -SqlInstance SqlServer2017 </dev:code><dev:remarks><maml:para> Runs the command DBCC CHECKCONSTRAINTS to check all enabled constraints on all tables for all databases for the instance SqlServer2017. Connect using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCheckConstraint -SqlInstance SqlServer2017 -Database CurrentDB </dev:code><dev:remarks><maml:para> Connect to instance SqlServer2017 using Windows Authentication and run the command DBCC CHECKCONSTRAINTS to check all enabled constraints on all tables in the CurrentDB database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCheckConstraint -SqlInstance SqlServer2017 -Database CurrentDB -Object Sometable </dev:code><dev:remarks><maml:para> Connects to CurrentDB on instance SqlServer2017 using Windows Authentication and runs the command DBCC CHECKCONSTRAINTS(SometableId) to check all enabled constraints in the table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCheckConstraint -SqlInstance SqlServer2017 -Database CurrentDB -Object ConstraintId </dev:code><dev:remarks><maml:para> Connects to CurrentDB on instance SqlServer2017 using Windows Authentication and runs the command DBCC CHECKCONSTRAINTS(ConstraintId) to check the constraint with constraint_id = ConstraintId. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaDbDbccCheckConstraint -SqlInstance SqlServer2017 -SqlCredential $cred -Database CurrentDB -Object TableId -AllConstraints -AllErrorMessages -NoInformationalMessages Connects to CurrentDB on instance SqlServer2017 using sqladmin credential and runs the command DBCC CHECKCONSTRAINTS(TableId) WITH ALL_CONSTRAINTS, ALL_ERRORMSGS, NO_INFOMSGS to check all enabled and disabled constraints on the table with able_id = TableId. Returns all rows that violate constraints. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Invoke-DbaDbDbccCheckConstraint -WhatIf </dev:code><dev:remarks><maml:para> Displays what will happen if command DBCC CHECKCONSTRAINTS is called against all databses on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDbccCheckConstraint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDbccCleanTable</command:name><command:noun>DbaDbDbccCleanTable</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC CLEANTABLE</maml:para></maml:description></command:details><maml:description><maml:para>Executes the command DBCC CLEANTABLE against defined objects and returns results</maml:para><maml:para>Reclaims space from dropped variable-length columns in tables or indexed views</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-cleantable-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDbccCleanTable</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table(s) or indexed view(s) to be cleaned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Is the number of rows processed per transaction. If not specified, or if 0 is specified, the statement processes the whole table in one transaction.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>Is the number of rows processed per transaction. If not specified, or if 0 is specified, the statement processes the whole table in one transaction.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Object</maml:name><maml:description><maml:para>The table(s) or indexed view(s) to be cleaned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCleanTable -SqlInstance SqlServer2017 -Database CurrentDB -Object 'dbo.SomeTable' </dev:code><dev:remarks><maml:para> Connects to CurrentDB on instance SqlServer2017 using Windows Authentication and runs the command DBCC CLEANTABLE('CurrentDB', 'dbo.SomeTable') to reclaim space after variable-length columns have been dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccCleanTable -SqlInstance SqlServer2017 -Database CurrentDB -Object 34636372 -BatchSize 5000 </dev:code><dev:remarks><maml:para> Connects to CurrentDB on instance SqlServer2017 using Windows Authentication and runs the command DBCC CLEANTABLE('CurrentDB', 34636372, 5000) to reclaim space from table with Table_Id = 34636372 after variable-length columns have been dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaDbDbccCleanTable -SqlInstance SqlServer2017 -SqlCredential $cred -Database CurrentDB -Object 'dbo.SomeTable' -NoInformationalMessages Connects to CurrentDB on instance SqlServer2017 using sqladmin credential and runs the command DBCC CLEANTABLE('CurrentDB', 'dbo.SomeTable') WITH NO_INFOMSGS to reclaim space after variable-length columns have been dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Invoke-DbaDbDbccCleanTable -Object 'dbo.SomeTable' -BatchSize 5000 </dev:code><dev:remarks><maml:para> Runs the command DBCC CLEANTABLE('DatabaseName', 'dbo.SomeTable', 5000) against all databses on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDbccCleanTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDbccUpdateUsage</command:name><command:noun>DbaDbDbccUpdateUsage</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Execution of Database Console Command DBCC UPDATEUSAGE</maml:para></maml:description></command:details><maml:description><maml:para>Executes the command DBCC UPDATEUSAGE and returns results</maml:para><maml:para>Reports and corrects pages and row count inaccuracies in the catalog views.</maml:para><maml:para>These inaccuracies may cause incorrect space usage reports returned by the sp_spaceused system stored procedure.</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-updateusage-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDbccUpdateUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed. The Name or Id of a database can be specified Database names must comply with the rules for identifiers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table or indexed view to process. Table and view names must comply with the rules for identifiers The Id of Table or View can be specified If not specified, all tables or indexed views will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Index</maml:name><maml:description><maml:para>The Index to process. The Id of Index can be specified If not specified, all indexes for the specified table or view will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CountRows</maml:name><maml:description><maml:para>Specifies that the row count column is updated with the current count of the number of rows in the table or view.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CountRows</maml:name><maml:description><maml:para>Specifies that the row count column is updated with the current count of the number of rows in the table or view.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed. The Name or Id of a database can be specified Database names must comply with the rules for identifiers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Index</maml:name><maml:description><maml:para>The Index to process. The Id of Index can be specified If not specified, all indexes for the specified table or view will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInformationalMessages</maml:name><maml:description><maml:para>Suppresses all informational messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table or indexed view to process. Table and view names must comply with the rules for identifiers The Id of Table or View can be specified If not specified, all tables or indexed views will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccUpdateUsage -SqlInstance SqlServer2017 </dev:code><dev:remarks><maml:para> Runs the command DBCC UPDATEUSAGE to update the page or row counts or both for all objects in all databases for the instance SqlServer2017. Connect using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccUpdateUsage -SqlInstance SqlServer2017 -Database CurrentDB </dev:code><dev:remarks><maml:para> Runs the command DBCC UPDATEUSAGE to update the page or row counts or both for all objects in the CurrentDB database for the instance SqlServer2017. Connect using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDbccUpdateUsage -SqlInstance SqlServer2017 -Database CurrentDB -Table Sometable </dev:code><dev:remarks><maml:para> Connects to CurrentDB on instance SqlServer2017 using Windows Authentication and runs the command DBCC UPDATEUSAGE(SometableId) to update the page or row counts for all indexes in the table. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaDbDbccUpdateUsage -SqlInstance SqlServer2017 -SqlCredential $cred -Database CurrentDB -Table 'SometableId -Index IndexName -NoInformationalMessages -CountRows Connects to CurrentDB on instance SqlServer2017 using sqladmin credential and runs the command DBCC UPDATEUSAGE(SometableId, IndexName) WITH NO_INFOMSGS, COUNT_ROWS to update the page or row counts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Sql1','Sql2/sqlexpress' | Invoke-DbaDbDbccUpdateUsage -WhatIf </dev:code><dev:remarks><maml:para> Displays what will happen if command DBCC UPDATEUSAGE is called against all databses on Sql1 and Sql2/sqlexpress </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDbccUpdateUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbDecryptObject</command:name><command:noun>DbaDbDecryptObject</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Returns the decrypted version of an object</maml:para></maml:description></command:details><maml:description><maml:para>SQL Server provides an option to encrypt the code used in various types of objects.</maml:para><maml:para>If the original code is no longer available for an encrypted object it won't be possible to view the definition.</maml:para><maml:para>With this command the dedicated admin connection (DAC) can be used to search for the object and decrypt it.</maml:para><maml:para>The command will output the results to the console by default.</maml:para><maml:para>There is an option to export all the results to a folder creating .sql files.</maml:para><maml:para>To connect to a remote SQL instance the remote dedicated administrator connection option will need to be configured.</maml:para><maml:para>The binary versions of the objects can only be retrieved using a DAC connection.</maml:para><maml:para>You can check the remote DAC connection with:</maml:para><maml:para>'Get-DbaSpConfigure -SqlInstance [yourinstance] -ConfigName RemoteDacConnectionsEnabled'</maml:para><maml:para>It should say 1 in the ConfiguredValue.</maml:para><maml:para>The local DAC connection is enabled by default.</maml:para><maml:para>To change the configurations you can use the Set-DbaSpConfigure command:</maml:para><maml:para>'Set-DbaSpConfigure -SqlInstance [yourinstance] -ConfigName RemoteDacConnectionsEnabled -Value 1'</maml:para><maml:para>In some cases you may need to reboot the instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbDecryptObject</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to search for the object.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>The name of the object to search for in the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncodingType</maml:name><maml:description><maml:para>The encoding type used to decrypt and encrypt values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportDestination</maml:name><maml:description><maml:para>Location to output the decrypted object definitions. The destination will use the instance name, database name and object type i.e.: C:\temp\decrypt\SQLDB1\DB1\StoredProcedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to search for the object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncodingType</maml:name><maml:description><maml:para>The encoding type used to decrypt and encrypt values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportDestination</maml:name><maml:description><maml:para>Location to output the decrypted object definitions. The destination will use the instance name, database name and object type i.e.: C:\temp\decrypt\SQLDB1\DB1\StoredProcedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>The name of the object to search for in the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Encryption, Decrypt, Utility Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1 </dev:code><dev:remarks><maml:para> Decrypt object "Function1" in DB1 of instance SQLDB1 and output the data to the user. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1 -ExportDestination C:\temp\decrypt </dev:code><dev:remarks><maml:para> Decrypt object "Function1" in DB1 of instance SQLDB1 and output the data to the folder "C:\temp\decrypt". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ExportDestination C:\temp\decrypt </dev:code><dev:remarks><maml:para> Decrypt all objects in DB1 of instance SQLDB1 and output the data to the folder "C:\temp\decrypt" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbDecryptObject -SqlInstance SQLDB1 -Database DB1 -ObjectName Function1, Function2 </dev:code><dev:remarks><maml:para> Decrypt objects "Function1" and "Function2" and output the data to the user. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> "SQLDB1" | Invoke-DbaDbDecryptObject -Database DB1 -ObjectName Function1, Function2 </dev:code><dev:remarks><maml:para> Decrypt objects "Function1" and "Function2" and output the data to the user using a pipeline for the instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbDecryptObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbLogShipping</command:name><command:noun>DbaDbLogShipping</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Invoke-DbaDbLogShipping sets up log shipping for one or more databases</maml:para></maml:description></command:details><maml:description><maml:para>Invoke-DbaDbLogShipping helps to easily set up log shipping for one or more databases.</maml:para><maml:para>This 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.</maml:para><maml:para>There are some settings that cannot be made by the function and they need to be prepared before the function is executed.</maml:para><maml:para>The following settings need to be made before log shipping can be initiated:</maml:para><maml:para>- Backup destination (the folder and the privileges)</maml:para><maml:para>- Copy destination (the folder and the privileges)</maml:para><maml:para>* Privileges</maml:para><maml:para>Make sure your agent service on both the primary and the secondary instance is an Active Directory account.</maml:para><maml:para>Also have the credentials ready to set the folder permissions</maml:para><maml:para>** Network share</maml:para><maml:para>The backup destination needs to be shared and have the share privileges of FULL CONTROL to Everyone.</maml:para><maml:para>** NTFS permissions</maml:para><maml:para>The backup destination must have at least read/write permissions for the primary instance agent account.</maml:para><maml:para>The backup destination must have at least read permissions for the secondary instance agent account.</maml:para><maml:para>The copy destination must have at least read/write permission for the secondary instance agent account.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbLogShipping</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance which contains the databases to be log shipped. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination SQL Server instance which contains the databases to be log shipped. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to set up log shipping for.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The backup unc path to place the backup files. This is the root directory. A directory with the name of the database will be created in this path.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalPath</maml:name><maml:description><maml:para>If the backup path is locally for the source server you can also set this value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupJob</maml:name><maml:description><maml:para>Name of the backup that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the backup job name. The default is "LSBackup_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRetention</maml:name><maml:description><maml:para>The backup retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupSchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the backup job. The parameter works as a prefix where the name of the database will be added to the backup job schedule name. Default is "LSBackupSchedule_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the backup schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the backup job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the sub-day FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of sub-day type periods to occur between each execution of the backup job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="22" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupThreshold</maml:name><maml:description><maml:para>Is the length of time, in minutes, after the last backup before a threshold alert error is raised. The default is 60.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>Do the backups need to be compressed. By default the backups are not compressed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="23" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyDestinationFolder</maml:name><maml:description><maml:para>The path to copy the transaction log backup files to. This is the root directory. A directory with the name of the database will be created in this path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="24" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyJob</maml:name><maml:description><maml:para>Name of the copy job that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the copy job name. The default is "LSBackup_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="25" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyRetention</maml:name><maml:description><maml:para>The copy retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="26" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopySchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the copy job. The parameter works as a prefix where the name of the database will be added to the copy job schedule name. Default is "LSCopy_[DestinationServerName]_[DatabaseName]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the copy schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="27" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="28" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the copy job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="29" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="30" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of the copy job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="31" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="32" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="33" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="34" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="35" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="36" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisconnectUsers</maml:name><maml:description><maml:para>If this parameter is set in combinations of standby the users will be disconnected during restore.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="37" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullBackupPath</maml:name><maml:description><maml:para>Path to an existing full backup. Use this when an existing backup needs to used to initialize the database on the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GenerateFullBackup</maml:name><maml:description><maml:para>If the database is not initialized on the secondary instance it can be done by creating a new full backup and restore it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="38" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetention</maml:name><maml:description><maml:para>Is the length of time in minutes in which the history is retained. The default value is 14420</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this parameter is set the database will be in recovery mode. The database will not be readable. This setting is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInitialization</maml:name><maml:description><maml:para>If this parameter is set the secondary database will not be initialized. The database needs to be on the secondary instance in recovery mode.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="39" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorServer</maml:name><maml:description><maml:para>Is the name of the monitor server for the primary server. The default is the name of the primary sql server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="40" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorCredential</maml:name><maml:description><maml:para>Allows you to login to enter a secure credential. Only needs to be used when the PrimaryMonitorServerSecurityMode is 0 or "sqlserver" To use: $scred = Get-Credential, then pass $scred object to the -PrimaryMonitorCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="41" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorServerSecurityMode</maml:name><maml:description><maml:para>The security mode used to connect to the monitor server for the primary server. Allowed values are 0, "sqlserver", 1, "windows" The default is 1 or Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryThresholdAlertEnabled</maml:name><maml:description><maml:para>Enables the Threshold alert for the primary database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="42" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreDataFolder</maml:name><maml:description><maml:para>Folder to be used to restore the database data files. Only used when parameter GenerateFullBackup or UseExistingFullBackup are set. If the parameter is not set the default data folder of the secondary instance will be used. If the folder is set but doesn't exist we will try to create the folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="43" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreLogFolder</maml:name><maml:description><maml:para>Folder to be used to restore the database log files. Only used when parameter GenerateFullBackup or UseExistingFullBackup are set. If the parameter is not set the default transaction log folder of the secondary instance will be used. If the folder is set but doesn't exist we will try to create the folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="44" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreDelay</maml:name><maml:description><maml:para>In case a delay needs to be set for the restore. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="45" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreAlertThreshold</maml:name><maml:description><maml:para>The amount of minutes after which an alert will be raised is no restore has taken place. The default is 45 minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="46" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreJob</maml:name><maml:description><maml:para>Name of the restore job that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the restore job name. The default is "LSRestore_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="47" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreRetention</maml:name><maml:description><maml:para>The backup retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="48" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreSchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the restore job. The parameter works as a prefix where the name of the database will be added to the restore job schedule name. Default is "LSRestore_[DestinationServerName]_[DatabaseName]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the restore schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="49" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="50" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the restore job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="51" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="52" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of the restore job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="53" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="54" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="55" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="56" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="57" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="58" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="59" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreThreshold</maml:name><maml:description><maml:para>The number of minutes allowed to elapse between restore operations before an alert is generated. The default value = 45</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="60" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDatabasePrefix</maml:name><maml:description><maml:para>The secondary database can be renamed to include a prefix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="61" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDatabaseSuffix</maml:name><maml:description><maml:para>The secondary database can be renamed to include a suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="62" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorServer</maml:name><maml:description><maml:para>Is the name of the monitor server for the secondary server. The default is the name of the secondary sql server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="63" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorCredential</maml:name><maml:description><maml:para>Allows you to login to enter a secure credential. Only needs to be used when the SecondaryMonitorServerSecurityMode is 0 or "sqlserver" To use: $scred = Get-Credential, then pass $scred object to the -SecondaryMonitorCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="64" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorServerSecurityMode</maml:name><maml:description><maml:para>The security mode used to connect to the monitor server for the secondary server. Allowed values are 0, "sqlserver", 1, "windows" The default is 1 or Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryThresholdAlertEnabled</maml:name><maml:description><maml:para>Enables the Threshold alert for the secondary database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Standby</maml:name><maml:description><maml:para>If this parameter is set the database will be set to standby mode making the database readable. If not set the database will be in recovery mode.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="65" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>Directory to place the standby file(s) in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseExistingFullBackup</maml:name><maml:description><maml:para>If the database is not initialized on the secondary instance it can be done by selecting an existing full backup and restore it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="66" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseBackupFolder</maml:name><maml:description><maml:para>This enables the user to specify a specific backup folder containing one or more backup files to initialize the database on the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Use this switch to disable any kind of verbose messages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupJob</maml:name><maml:description><maml:para>Name of the backup that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the backup job name. The default is "LSBackup_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRetention</maml:name><maml:description><maml:para>The backup retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupSchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the backup job. The parameter works as a prefix where the name of the database will be added to the backup job schedule name. Default is "LSBackupSchedule_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the backup schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the backup job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of sub-day type periods to occur between each execution of the backup job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the sub-day FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupThreshold</maml:name><maml:description><maml:para>Is the length of time, in minutes, after the last backup before a threshold alert error is raised. The default is 60.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressBackup</maml:name><maml:description><maml:para>Do the backups need to be compressed. By default the backups are not compressed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyDestinationFolder</maml:name><maml:description><maml:para>The path to copy the transaction log backup files to. This is the root directory. A directory with the name of the database will be created in this path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyJob</maml:name><maml:description><maml:para>Name of the copy job that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the copy job name. The default is "LSBackup_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyRetention</maml:name><maml:description><maml:para>The copy retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopySchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the copy job. The parameter works as a prefix where the name of the database will be added to the copy job schedule name. Default is "LSCopy_[DestinationServerName]_[DatabaseName]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the copy schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the copy job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of the copy job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to set up log shipping for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination SQL Server instance which contains the databases to be log shipped. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisconnectUsers</maml:name><maml:description><maml:para>If this parameter is set in combinations of standby the users will be disconnected during restore.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Use this switch to disable any kind of verbose messages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullBackupPath</maml:name><maml:description><maml:para>Path to an existing full backup. Use this when an existing backup needs to used to initialize the database on the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GenerateFullBackup</maml:name><maml:description><maml:para>If the database is not initialized on the secondary instance it can be done by creating a new full backup and restore it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetention</maml:name><maml:description><maml:para>Is the length of time in minutes in which the history is retained. The default value is 14420</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalPath</maml:name><maml:description><maml:para>If the backup path is locally for the source server you can also set this value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoInitialization</maml:name><maml:description><maml:para>If this parameter is set the secondary database will not be initialized. The database needs to be on the secondary instance in recovery mode.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this parameter is set the database will be in recovery mode. The database will not be readable. This setting is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorCredential</maml:name><maml:description><maml:para>Allows you to login to enter a secure credential. Only needs to be used when the PrimaryMonitorServerSecurityMode is 0 or "sqlserver" To use: $scred = Get-Credential, then pass $scred object to the -PrimaryMonitorCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorServer</maml:name><maml:description><maml:para>Is the name of the monitor server for the primary server. The default is the name of the primary sql server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryMonitorServerSecurityMode</maml:name><maml:description><maml:para>The security mode used to connect to the monitor server for the primary server. Allowed values are 0, "sqlserver", 1, "windows" The default is 1 or Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryThresholdAlertEnabled</maml:name><maml:description><maml:para>Enables the Threshold alert for the primary database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreAlertThreshold</maml:name><maml:description><maml:para>The amount of minutes after which an alert will be raised is no restore has taken place. The default is 45 minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreDataFolder</maml:name><maml:description><maml:para>Folder to be used to restore the database data files. Only used when parameter GenerateFullBackup or UseExistingFullBackup are set. If the parameter is not set the default data folder of the secondary instance will be used. If the folder is set but doesn't exist we will try to create the folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreDelay</maml:name><maml:description><maml:para>In case a delay needs to be set for the restore. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreJob</maml:name><maml:description><maml:para>Name of the restore job that will be created in the SQL Server agent. The parameter works as a prefix where the name of the database will be added to the restore job name. The default is "LSRestore_[databasename]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreLogFolder</maml:name><maml:description><maml:para>Folder to be used to restore the database log files. Only used when parameter GenerateFullBackup or UseExistingFullBackup are set. If the parameter is not set the default transaction log folder of the secondary instance will be used. If the folder is set but doesn't exist we will try to create the folder.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreRetention</maml:name><maml:description><maml:para>The backup retention period in minutes. Default is 4320 / 72 hours</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreSchedule</maml:name><maml:description><maml:para>Name of the backup schedule created for the restore job. The parameter works as a prefix where the name of the database will be added to the restore job schedule name. Default is "LSRestore_[DestinationServerName]_[DatabaseName]"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleDisabled</maml:name><maml:description><maml:para>Parameter to set the restore schedule to disabled upon creation. By default the schedule is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleEndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleEndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyInterval</maml:name><maml:description><maml:para>The number of type periods to occur between each execution of the restore job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of the restore job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are "Time", "Seconds", "Minutes", "Hours"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleFrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values are "Daily", "AgentStart", "IdleComputer"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleStartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreScheduleStartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreThreshold</maml:name><maml:description><maml:para>The number of minutes allowed to elapse between restore operations before an alert is generated. The default value = 45</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDatabasePrefix</maml:name><maml:description><maml:para>The secondary database can be renamed to include a prefix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDatabaseSuffix</maml:name><maml:description><maml:para>The secondary database can be renamed to include a suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorCredential</maml:name><maml:description><maml:para>Allows you to login to enter a secure credential. Only needs to be used when the SecondaryMonitorServerSecurityMode is 0 or "sqlserver" To use: $scred = Get-Credential, then pass $scred object to the -SecondaryMonitorCredential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorServer</maml:name><maml:description><maml:para>Is the name of the monitor server for the secondary server. The default is the name of the secondary sql server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryMonitorServerSecurityMode</maml:name><maml:description><maml:para>The security mode used to connect to the monitor server for the secondary server. Allowed values are 0, "sqlserver", 1, "windows" The default is 1 or Windows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryThresholdAlertEnabled</maml:name><maml:description><maml:para>Enables the Threshold alert for the secondary database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The backup unc path to place the backup files. This is the root directory. A directory with the name of the database will be created in this path.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance which contains the databases to be log shipped. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Standby</maml:name><maml:description><maml:para>If this parameter is set the database will be set to standby mode making the database readable. If not set the database will be in recovery mode.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>Directory to place the standby file(s) in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseBackupFolder</maml:name><maml:description><maml:para>This enables the user to specify a specific backup folder containing one or more backup files to initialize the database on the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseExistingFullBackup</maml:name><maml:description><maml:para>If the database is not initialized on the secondary instance it can be done by selecting an existing full backup and restore it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LogShipping Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SourceSqlInstance = 'sql1' >> DestinationSqlInstance = 'sql2' >> Database = 'db1' >> SharedPath= '\\sql1\logshipping' >> LocalPath= 'D:\Data\logshipping' >> BackupScheduleFrequencyType = 'daily' >> BackupScheduleFrequencyInterval = 1 >> CompressBackup = $true >> CopyScheduleFrequencyType = 'daily' >> CopyScheduleFrequencyInterval = 1 >> GenerateFullBackup = $true >> RestoreScheduleFrequencyType = 'daily' >> RestoreScheduleFrequencyInterval = 1 >> SecondaryDatabaseSuffix = 'LS' >> CopyDestinationFolder = '\\sql2\logshippingdest' >> Force = $true >> } >> PS C:\> Invoke-DbaDbLogShipping @params Sets up log shipping for database "db1" with the backup path to a network share allowing local backups. It creates daily schedules for the backup, copy and restore job with all the defaults to be executed every 15 minutes daily. The secondary database will be called "db1_LS". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SourceSqlInstance = 'sql1' >> DestinationSqlInstance = 'sql2' >> Database = 'db1' >> SharedPath= '\\sql1\logshipping' >> GenerateFullBackup = $true >> Force = $true >> } >> PS C:\> Invoke-DbaDbLogShipping @params Sets up log shipping with all defaults except that a backup file is generated. The 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 "logshipping" i.e. "D:\SQLBackup\Logshiping". </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbLogShipping</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbLogShipRecovery</command:name><command:noun>DbaDbLogShipRecovery</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Invoke-DbaDbLogShipRecovery recovers log shipped databases to a normal state to act upon a migration or disaster.</maml:para></maml:description></command:details><maml:description><maml:para>By default all the databases for a particular instance are recovered.</maml:para><maml:para>If the database is in the right state, either standby or recovering, the process will try to recover the database.</maml:para><maml:para>At first the function will check if the backup source directory can still be reached.</maml:para><maml:para>If 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.</maml:para><maml:para>If the directory cannot be reached for the function will continue to the restoring process.</maml:para><maml:para>After the copy job check is performed the job is disabled to prevent the job to run.</maml:para><maml:para>For the restore the log shipping status is checked in the msdb database.</maml:para><maml:para>If the last restored file is not the same as the last file name found, the log shipping restore job will be executed.</maml:para><maml:para>After the restore job check is performed the job is disabled to prevent the job to run</maml:para><maml:para>The last part is to set the database online by restoring the databases with recovery</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbLogShipRecovery</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to perform the restore for. This value can also be piped enabling multiple databases to be recovered. If this value is not supplied all databases will be recovered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Allows you to choose to not restore the database to a functional state (Normal) in the final steps of the process. By default the database is restored to a functional state (Normal).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Use this parameter to force the function to continue and perform any adjusting actions to successfully execute</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Delay</maml:name><maml:description><maml:para>Set the delay in seconds to wait for the copy and/or restore jobs. By default the delay is 5 seconds</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to perform the restore for. This value can also be piped enabling multiple databases to be recovered. If this value is not supplied all databases will be recovered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Delay</maml:name><maml:description><maml:para>Set the delay in seconds to wait for the copy and/or restore jobs. By default the delay is 5 seconds</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Use this parameter to force the function to continue and perform any adjusting actions to successfully execute</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Allows you to choose to not restore the database to a functional state (Normal) in the final steps of the process. By default the database is restored to a functional state (Normal).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LogShipping Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -Force </dev:code><dev:remarks><maml:para> Recovers all the databases on the instance that are enabled for log shipping </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -SqlCredential $cred -Verbose -Force </dev:code><dev:remarks><maml:para> Recovers all the databases on the instance that are enabled for log shipping using a credential </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -database db_logship -Verbose </dev:code><dev:remarks><maml:para> Recovers the database "db_logship" to a normal status </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> db1, db2, db3, db4 | Invoke-DbaDbLogShipRecovery -SqlInstance server1 -Verbose </dev:code><dev:remarks><maml:para> Recovers the database db1, db2, db3, db4 to a normal status </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -Force -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbLogShipRecovery</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbMirrorFailover</command:name><command:noun>DbaDbMirrorFailover</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Failover a mirrored database</maml:para></maml:description></command:details><maml:description><maml:para>Failover a mirrored database</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbMirrorFailover</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the primary SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to mirror</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Force Failover and allow data loss</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to mirror</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Force Failover and allow data loss</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the primary SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT TODO: add service accounts </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbMirrorFailover -SqlInstance sql2016 -Database pubs </dev:code><dev:remarks><maml:para> Fails over the pubs database on sql2016. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database pubs | Invoke-DbaDbMirrorFailover -Force -Confirm:$false </dev:code><dev:remarks><maml:para> Forces the failover of the pubs database on sql2016 and allows data loss. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbMirrorFailover</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbMirroring</command:name><command:noun>DbaDbMirroring</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Automates the creation of database mirrors.</maml:para></maml:description></command:details><maml:description><maml:para>Automates the creation of database mirrors.</maml:para><maml:para>* Verifies that a mirror is possible</maml:para><maml:para>* Sets the recovery model to Full if needed</maml:para><maml:para>* If the database does not exist on mirror, a backup/restore is performed</maml:para><maml:para>* Sets up endpoints if necessary</maml:para><maml:para>* Creates a login and grants permissions to service accounts if needed</maml:para><maml:para>* Starts endpoints if needed</maml:para><maml:para>* Sets up partner for mirror</maml:para><maml:para>* Sets up partner for primary</maml:para><maml:para>* Sets up witness if one is specified</maml:para><maml:para>NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbMirroring</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the primary SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mirror</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the mirror SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MirrorSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Witness</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the witness SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WitnessSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to mirror.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full backup of database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the database on remote servers using fresh backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to mirror.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the database on remote servers using fresh backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mirror</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the mirror SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MirrorSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the primary SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full backup of database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Witness</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the witness SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WitnessSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> Primary = 'sql2017a' >> Mirror = 'sql2017b' >> MirrorSqlCredential = 'sqladmin' >> Witness = 'sql2019' >> Database = 'pubs' >> SharedPath = '\\nas\sql\share' >> } >> PS C:\> Invoke-DbaDbMirroring @params Performs a bunch of checks to ensure the pubs database on sql2017a can be mirrored from sql2017a to sql2017b. Logs in to sql2019 and sql2017a using Windows credentials and sql2017b using a SQL credential. Prompts for confirmation for most changes. To avoid confirmation, use -Confirm:$false or use the syntax in the second example. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> Primary = 'sql2017a' >> Mirror = 'sql2017b' >> MirrorSqlCredential = 'sqladmin' >> Witness = 'sql2019' >> Database = 'pubs' >> SharedPath = '\\nas\sql\share' >> Force = $true >> Confirm = $false >> } >> PS C:\> Invoke-DbaDbMirroring @params Performs a bunch of checks to ensure the pubs database on sql2017a can be mirrored from sql2017a to sql2017b. Logs in to sql2019 and sql2017a using Windows credentials and sql2017b using a SQL credential. Drops existing pubs database on Mirror and restores it with a fresh backup. Does all the things in the description, does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $map = @{ 'database_data' = 'M:\Data\database_data.mdf' 'database_log' = 'L:\Log\database_log.ldf' } </dev:code><dev:remarks><maml:para> PS C:\> Get-ChildItem \\nas\seed | Restore-DbaDatabase -SqlInstance sql2017b -FileMapping $map -NoRecovery PS C:\> Get-DbaDatabase -SqlInstance sql2017a -Database pubs | Invoke-DbaDbMirroring -Mirror sql2017b -Confirm:$false Restores backups from sql2017a to a specific file structure on sql2017b then creates mirror with no prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017a -Database pubs | </dev:code><dev:remarks><maml:para> >> Invoke-DbaDbMirroring -Mirror sql2017b -UseLastBackup -Confirm:$false Mirrors pubs on sql2017a to sql2017b and uses the last full and logs from sql2017a to seed. Doesn't prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbMirroring</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbPiiScan</command:name><command:noun>DbaDbPiiScan</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Command to return any columns that could potentially contain PII (Personal Identifiable Information)</maml:para></maml:description></command:details><maml:description><maml:para>This command will go through the tables in your database and assess each column.</maml:para><maml:para>It will first check the columns names if it was named in such a way that it would indicate PII.</maml:para><maml:para>The next thing that it will do is pattern recognition by looking into the data from the table.</maml:para><maml:para>Custom scan definitions can be specified using the formats seen in <dbatools module root>\bin\datamasking\pii-knownnames.json and <dbatools module root>\bin\datamasking\pii-patterns.json.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbPiiScan</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Table(s) to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Column(s) to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Country</maml:name><maml:description><maml:para>Filter out the patterns and known types for one or more countries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CountryCode</maml:name><maml:description><maml:para>Filter out the patterns and known types for one or more country code</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude certain tables</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude certain columns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleCount</maml:name><maml:description><maml:para>Amount of rows to sample to make an assessment. The default is 100</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KnownNameFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom known names. Custom scan definitions can be specified using the format seen in <dbatools module root>\bin\datamasking\pii-knownnames.json.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PatternFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom patterns. Custom scan definitions can be specified using the format seen in <dbatools module root>\bin\datamasking\pii-patterns.json.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultKnownName</maml:name><maml:description><maml:para>Excludes the default known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultPattern</maml:name><maml:description><maml:para>Excludes the default patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Column(s) to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Country</maml:name><maml:description><maml:para>Filter out the patterns and known types for one or more countries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CountryCode</maml:name><maml:description><maml:para>Filter out the patterns and known types for one or more country code</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeColumn</maml:name><maml:description><maml:para>Exclude certain columns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultKnownName</maml:name><maml:description><maml:para>Excludes the default known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultPattern</maml:name><maml:description><maml:para>Excludes the default patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeTable</maml:name><maml:description><maml:para>Exclude certain tables</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KnownNameFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom known names. Custom scan definitions can be specified using the format seen in <dbatools module root>\bin\datamasking\pii-knownnames.json.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PatternFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom patterns. Custom scan definitions can be specified using the format seen in <dbatools module root>\bin\datamasking\pii-patterns.json.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleCount</maml:name><maml:description><maml:para>Amount of rows to sample to make an assessment. The default is 100</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Table(s) to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataMasking, GDPR, PII Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1 -Database db1 </dev:code><dev:remarks><maml:para> Scan the database db1 on instance sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1, sql2 -Database db1, db2 </dev:code><dev:remarks><maml:para> Scan multiple databases on multiple instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1 -Database db2 -ExcludeColumn firstname </dev:code><dev:remarks><maml:para> Scan database db2 but exclude the column firstname </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1 -Database db2 -CountryCode US </dev:code><dev:remarks><maml:para> Scan database db2 but only apply data patterns used for the United States </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1 -Database db1 -PatternFilePath c:\pii\patterns.json </dev:code><dev:remarks><maml:para> Scans db1 on instance sql1 with additional custom patterns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbPiiScan -SqlInstance sql1 -Database db1 -PatternFilePath c:\pii\patterns.json -ExcludeDefaultPattern </dev:code><dev:remarks><maml:para> Scans db1 on instance sql1 with additional custom patterns, excluding the default patterns </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbPiiScan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbShrink</command:name><command:noun>DbaDbShrink</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Shrinks all files in a database. This is a command that should rarely be used. - Shrinks can cause severe index fragmentation (to the tune of 99%) - Shrinks can cause massive growth in the database's transaction log - Shrinks can require a lot of time and system resources to perform data movement</maml:para></maml:description></command:details><maml:description><maml:para>Shrinks all files in a database. Databases should be shrunk only when completely necessary.</maml:para><maml:para>Many 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:</maml:para><maml:para>http://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files</maml:para><maml:para>https://www.itprotoday.com/sql-server/shrinking-data-files</maml:para><maml:para>However, there are some cases where a database will need to be shrunk. In the event that you must shrink your database:</maml:para><maml:para>1. Ensure you have plenty of space for your T-Log to grow</maml:para><maml:para>2. Understand that shrinks require a lot of CPU and disk resources</maml:para><maml:para>3. Consider running DBCC INDEXDEFRAG or ALTER INDEX ... REORGANIZE after the shrink is complete.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbShrink</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PercentFreeSpace</maml:name><maml:description><maml:para>Specifies how much free space to leave, defaults to 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkMethod</maml:name><maml:description><maml:para>Specifies the method that is used to shrink the database Default Data in pages located at the end of a file is moved to pages earlier in the file. Files are truncated to reflect allocated space. EmptyFile Migrates all of the data from the referenced file to other files in the same filegroup. (DataFile and LogFile objects only). NoTruncate Data in pages located at the end of a file is moved to pages earlier in the file. TruncateOnly Data distribution is not affected. Files are truncated to reflect allocated space, recovering free space at the end of any file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Specifies the files types that will be shrunk All - All Data and Log files are shrunk, using database shrink (Default) Data - Just the Data files are shrunk using file shrink Log - Just the Log files are shrunk using file shrink</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepSize</maml:name><maml:description><maml:para>Measured in bits - but no worries! PowerShell has a very cool way of formatting bits. Just specify something like: 1MB or 10GB. See the examples for more information. If specified, this will chunk a larger shrink operation into multiple smaller shrinks. If shrinking a file by a large amount there are benefits of doing multiple smaller chunks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (shrinks can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIndexStats</maml:name><maml:description><maml:para>Exclude statistics about fragmentation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeUpdateUsage</maml:name><maml:description><maml:para>Exclude DBCC UPDATE USAGE for database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIndexStats</maml:name><maml:description><maml:para>Exclude statistics about fragmentation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeUpdateUsage</maml:name><maml:description><maml:para>Exclude DBCC UPDATE USAGE for database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Specifies the files types that will be shrunk All - All Data and Log files are shrunk, using database shrink (Default) Data - Just the Data files are shrunk using file shrink Log - Just the Log files are shrunk using file shrink</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PercentFreeSpace</maml:name><maml:description><maml:para>Specifies how much free space to leave, defaults to 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShrinkMethod</maml:name><maml:description><maml:para>Specifies the method that is used to shrink the database Default Data in pages located at the end of a file is moved to pages earlier in the file. Files are truncated to reflect allocated space. EmptyFile Migrates all of the data from the referenced file to other files in the same filegroup. (DataFile and LogFile objects only). NoTruncate Data in pages located at the end of a file is moved to pages earlier in the file. TruncateOnly Data distribution is not affected. Files are truncated to reflect allocated space, recovering free space at the end of any file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (shrinks can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepSize</maml:name><maml:description><maml:para>Measured in bits - but no worries! PowerShell has a very cool way of formatting bits. Just specify something like: 1MB or 10GB. See the examples for more information. If specified, this will chunk a larger shrink operation into multiple smaller shrinks. If shrinking a file by a large amount there are benefits of doing multiple smaller chunks.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Shrink, Database Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbShrink -SqlInstance sql2016 -Database Northwind,pubs,Adventureworks2014 </dev:code><dev:remarks><maml:para> Shrinks Northwind, pubs and Adventureworks2014 to have as little free space as possible. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbShrink -SqlInstance sql2014 -Database AdventureWorks2014 -PercentFreeSpace 50 </dev:code><dev:remarks><maml:para> Shrinks AdventureWorks2014 to have 50% free space. So let's say AdventureWorks2014 was 1GB and it's using 100MB space. The database free space would be reduced to 50MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbShrink -SqlInstance sql2014 -Database AdventureWorks2014 -PercentFreeSpace 50 -FileType Data -StepSize 25MB </dev:code><dev:remarks><maml:para> Shrinks AdventureWorks2014 to have 50% free space, runs shrinks in 25MB chunks for improved performance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbShrink -SqlInstance sql2012 -AllUserDatabases </dev:code><dev:remarks><maml:para> Shrinks all user databases on SQL2012 (not ideal for production) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbShrink</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbTransfer</command:name><command:noun>DbaDbTransfer</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Invokes database transfer using a transfer object that clones objects from one database to another.</maml:para></maml:description></command:details><maml:description><maml:para>Invokes database transfer by either accepting an object generated by New-DbaDbTransfer, or generates such object</maml:para><maml:para>on the fly when provided with enough parameters. The transfer would follow the rules defined in the transfer object;</maml:para><maml:para>the list of such rules could be displayed when listing members of the transfer object:</maml:para><maml:para>$transfer = New-DbaDbTransfer -SqlInstance MyInstance -Database MyDB</maml:para><maml:para>$transfer | Get-Member</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbTransfer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination Sql Server. You must have appropriate access to create objects on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the objects from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the objects to. If not specified, it is assumed to be same as the source database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the data copy defaults to 5000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Custom scripting rules, generated by New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of database SMO objects into the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Transfer</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Transfer</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAllObjects</maml:name><maml:description><maml:para>Transfer all objects of the source database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAll</maml:name><maml:description><maml:para>Object types to be transferred from a database. Allowed values: FullTextCatalogs FullTextStopLists SearchPropertyLists Tables Views StoredProcedures UserDefinedFunctions UserDefinedDataTypes UserDefinedTableTypes PlanGuides Rules Defaults Users Roles PartitionSchemes PartitionFunctions XmlSchemaCollections SqlAssemblies UserDefinedAggregates UserDefinedTypes Schemas Synonyms Sequences DatabaseTriggers DatabaseScopedCredentials ExternalFileFormats ExternalDataSources Logins ExternalLibraries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOnly</maml:name><maml:description><maml:para>Transfers only object schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataOnly</maml:name><maml:description><maml:para>Transfers only data without copying schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOnly</maml:name><maml:description><maml:para>Generate the script without moving any objects. Does not include any data - just object definitions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the data copy defaults to 5000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAll</maml:name><maml:description><maml:para>Object types to be transferred from a database. Allowed values: FullTextCatalogs FullTextStopLists SearchPropertyLists Tables Views StoredProcedures UserDefinedFunctions UserDefinedDataTypes UserDefinedTableTypes PlanGuides Rules Defaults Users Roles PartitionSchemes PartitionFunctions XmlSchemaCollections SqlAssemblies UserDefinedAggregates UserDefinedTypes Schemas Synonyms Sequences DatabaseTriggers DatabaseScopedCredentials ExternalFileFormats ExternalDataSources Logins ExternalLibraries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAllObjects</maml:name><maml:description><maml:para>Transfer all objects of the source database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the objects from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataOnly</maml:name><maml:description><maml:para>Transfers only data without copying schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the objects to. If not specified, it is assumed to be same as the source database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination Sql Server. You must have appropriate access to create objects on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of database SMO objects into the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Transfer</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Transfer</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOnly</maml:name><maml:description><maml:para>Transfers only object schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Custom scripting rules, generated by New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOnly</maml:name><maml:description><maml:para>Generate the script without moving any objects. Does not include any data - just object definitions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Object Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2020 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbTransfer -SqlInstance sql1 -DestinationSqlInstance sql2 -Database mydb -CopyAll Tables -DestinationDatabase newdb </dev:code><dev:remarks><maml:para> Copies all tables from database mydb on sql1 to database newdb on sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbTransfer -SqlInstance sql1 -DestinationSqlInstance sql2 -Database mydb -CopyAllObjects </dev:code><dev:remarks><maml:para> Copies all objects from database mydb on sql1 to database mydb on sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $transfer = New-DbaDbTransfer -SqlInstance sql1 -DestinationSqlInstance sql2 -Database mydb -CopyAllObjects </dev:code><dev:remarks><maml:para> PS C:\> $transfer.Options.ScriptDrops = $true PS C:\> $transfer.SchemaOnly = $true PS C:\> $transfer | Invoke-DbaDbTransfer Copies object schema from database mydb on sql1 to database mydb on sql2 using customized transfer parameters. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\> $options.ScriptDrops = $true PS C:\> $transfer = New-DbaDbTransfer -SqlInstance sql1 -DestinationSqlInstance sql2 -Database mydb -CopyAll StoredProcedures -ScriptingOption $options PS C:\> $transfer | Invoke-DbaDbTransfer Copies procedures from database mydb on sql1 to database mydb on sql2 using custom scripting parameters. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbTransfer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDbUpgrade</command:name><command:noun>DbaDbUpgrade</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Take a database and upgrades it to compatibility of the SQL Instance its hosted on and updates the target recovery time to the new default of 60 seconds.</maml:para></maml:description></command:details><maml:description><maml:para>Updates compatibility level and target recovery time, then runs CHECKDB with data_purity, DBCC updateusage, sp_updatestats and finally sp_refreshview against all user views.</maml:para><maml:para>Based on https://thomaslarock.com/2014/06/upgrading-to-sql-server-2014-a-dozen-things-to-check/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDbUpgrade</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is autopopulated from the server. If unspecified, you have to use -ExcludeDatabase to exclude some user databases or -AllUserDatabases to process all user databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is autopopulated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCheckDb</maml:name><maml:description><maml:para>Skip checkdb</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoUpdateUsage</maml:name><maml:description><maml:para>Skip usage update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoUpdateStats</maml:name><maml:description><maml:para>Skip stats update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRefreshView</maml:name><maml:description><maml:para>Skip view update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Don't skip over databases that are already at the same level the instance is</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is autopopulated from the server. If unspecified, you have to use -ExcludeDatabase to exclude some user databases or -AllUserDatabases to process all user databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is autopopulated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Don't skip over databases that are already at the same level the instance is</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCheckDb</maml:name><maml:description><maml:para>Skip checkdb</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRefreshView</maml:name><maml:description><maml:para>Skip view update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoUpdateStats</maml:name><maml:description><maml:para>Skip stats update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoUpdateUsage</maml:name><maml:description><maml:para>Skip usage update</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Shrink, Database Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbUpgrade -SqlInstance PRD-SQL-MSD01 -Database Test </dev:code><dev:remarks><maml:para> Runs the below processes against the databases -- Puts compatibility of database to level of SQL Instance -- Changes the target recovery time to the new default of 60 seconds (for SQL Server 2016 and newer) -- Runs CHECKDB DATA_PURITY -- Runs DBCC UPDATESUSAGE -- Updates all users statistics -- Runs sp_refreshview against every view in the database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbUpgrade -SqlInstance PRD-SQL-INT01 -Database Test -NoRefreshView </dev:code><dev:remarks><maml:para> Runs the upgrade command skipping the sp_refreshview update on all views </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDbUpgrade -SqlInstance PRD-SQL-INT01 -Database Test -Force </dev:code><dev:remarks><maml:para> If database Test is already at the correct compatibility, runs every necessary step </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 | Out-GridView -Passthru | Invoke-DbaDbUpgrade </dev:code><dev:remarks><maml:para> Get only specific databases using GridView and pass those to Invoke-DbaDbUpgrade </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDbUpgrade</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaDiagnosticQuery</command:name><command:noun>DbaDiagnosticQuery</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Invoke-DbaDiagnosticQuery runs the scripts provided by Glenn Berry's DMV scripts on specified servers</maml:para></maml:description></command:details><maml:description><maml:para>This is the main function of the Sql Server Diagnostic Queries related functions in dbatools.</maml:para><maml:para>The diagnostic queries are developed and maintained by Glenn Berry and they can be found here along with a lot of documentation:</maml:para><maml:para>https://glennsqlperformance.com/resources/</maml:para><maml:para>The most recent version of the diagnostic queries are included in the dbatools module.</maml:para><maml:para>But it is possible to download a newer set or a specific version to an alternative location and parse and run those scripts.</maml:para><maml:para>It will run all or a selection of those scripts on one or multiple servers and return the result as a PowerShell Object</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaDiagnosticQuery</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Can be either a string or SMO server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQuery</maml:name><maml:description><maml:para>The Queries to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Alternate path for the diagnostic scripts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryName</maml:name><maml:description><maml:para>Only run specific query</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseSelectionHelper</maml:name><maml:description><maml:para>Provides a grid view with all the queries to choose from and will run the selection made by the user on the Sql Server instance specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceOnly</maml:name><maml:description><maml:para>Run only instance level queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseSpecific</maml:name><maml:description><maml:para>Run only database level queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQueryTextColumn</maml:name><maml:description><maml:para>Use this switch to exclude the [Complete Query Text] column from relevant queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePlanColumn</maml:name><maml:description><maml:para>Use this switch to exclude the [Query Plan] column from relevant queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoColumnParsing</maml:name><maml:description><maml:para>Does not parse the [Complete Query Text] and [Query Plan] columns and disregards the ExcludeQueryTextColumn and NoColumnParsing switches</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputPath</maml:name><maml:description><maml:para>Directory to parsed diagnostics queries to. This will split them based on server, database name, and query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportQueries</maml:name><maml:description><maml:para>Use this switch to export the diagnostic queries to sql files. Instead of running the queries, the server will be evaluated to find the appropriate queries to run based on SQL Version. These sql files will then be created in the OutputDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseSpecific</maml:name><maml:description><maml:para>Run only database level queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludePlanColumn</maml:name><maml:description><maml:para>Use this switch to exclude the [Query Plan] column from relevant queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQuery</maml:name><maml:description><maml:para>The Queries to exclude</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeQueryTextColumn</maml:name><maml:description><maml:para>Use this switch to exclude the [Complete Query Text] column from relevant queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExportQueries</maml:name><maml:description><maml:para>Use this switch to export the diagnostic queries to sql files. Instead of running the queries, the server will be evaluated to find the appropriate queries to run based on SQL Version. These sql files will then be created in the OutputDirectory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceOnly</maml:name><maml:description><maml:para>Run only instance level queries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoColumnParsing</maml:name><maml:description><maml:para>Does not parse the [Complete Query Text] and [Query Plan] columns and disregards the ExcludeQueryTextColumn and NoColumnParsing switches</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputPath</maml:name><maml:description><maml:para>Directory to parsed diagnostics queries to. This will split them based on server, database name, and query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Alternate path for the diagnostic scripts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryName</maml:name><maml:description><maml:para>Only run specific query</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Can be either a string or SMO server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseSelectionHelper</maml:name><maml:description><maml:para>Provides a grid view with all the queries to choose from and will run the selection made by the user on the Sql Server instance specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, GlennBerry Author: Andre Kamman (@AndreKamman), andrekamman.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Run the selection made by the user on the Sql Server instance specified. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance sql2016 -UseSelectionHelper | Export-DbaDiagnosticQuery -Path C:\temp\gboutput </dev:code><dev:remarks><maml:para> Provides a grid view with all the queries to choose from and will run the selection made by the user on the SQL Server instance specified. Then it will export the results to Export-DbaDiagnosticQuery. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance localhost -ExportQueries -OutputPath "C:\temp\DiagnosticQueries" </dev:code><dev:remarks><maml:para> Export All Queries to Disk </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance localhost -DatabaseSpecific -ExportQueries -OutputPath "C:\temp\DiagnosticQueries" </dev:code><dev:remarks><maml:para> Export Database Specific Queries for all User Dbs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance localhost -DatabaseSpecific -DatabaseName 'tempdb' -ExportQueries -OutputPath "C:\temp\DiagnosticQueries" </dev:code><dev:remarks><maml:para> Export Database Specific Queries For One Target Database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance localhost -DatabaseSpecific -DatabaseName 'tempdb' -ExportQueries -OutputPath "C:\temp\DiagnosticQueries" -QueryName 'Database-scoped Configurations' </dev:code><dev:remarks><maml:para> Export Database Specific Queries For One Target Database and One Specific Query </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaDiagnosticQuery -SqlInstance localhost -UseSelectionHelper </dev:code><dev:remarks><maml:para> Choose Queries To Export </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> [PSObject[]]$results = Invoke-DbaDiagnosticQuery -SqlInstance localhost -WhatIf </dev:code><dev:remarks><maml:para> Parse the appropriate diagnostic queries by connecting to server, and instead of running them, return as [PSCustomObject[]] to work with further </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $results = Invoke-DbaDiagnosticQuery -SqlInstance Sql2017 -DatabaseSpecific -QueryName 'Database-scoped Configurations' -DatabaseName TestStuff </dev:code><dev:remarks><maml:para> Run diagnostic queries targeted at specific database, and only run database level queries against this database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaDiagnosticQuery</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaPfRelog</command:name><command:noun>DbaPfRelog</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Pipeline-compatible wrapper for the relog command which is available on modern Windows platforms.</maml:para></maml:description></command:details><maml:description><maml:para>Pipeline-compatible wrapper for the relog command. Relog is useful for converting Windows Perfmon.</maml:para><maml:para>Extracts performance counters from performance counter logs into other formats,</maml:para><maml:para>such as text-TSV (for tab-delimited text), text-CSV (for comma-delimited text), binary-BIN, or SQL.</maml:para><maml:para>`relog "C:\PerfLogs\Admin\System Correlation\WORKSTATIONX_20180112-000001\DataCollector01.blg" -o C:\temp\foo.csv -f tsv`</maml:para><maml:para>If you find any input hangs, please send us the output so we can accommodate for it then use -Raw for an immediate solution.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaPfRelog</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the pathname of an existing performance counter log or performance counter path. You can specify multiple input files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Specifies the pathname of the output file or SQL database where the counters will be written. Defaults to the same directory as the source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The output format. Defaults to tsv. Options include tsv, csv, bin, and sql. For a SQL database, the output file specifies the DSN!counter_log. You can specify the database location by using the ODBC manager to configure the DSN (Database System Name). For more information, read here: https://technet.microsoft.com/en-us/library/bb490958.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, output will be appended to the specified file instead of overwriting. This option does not apply to SQL format where the default is always to append.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllowClobber</maml:name><maml:description><maml:para>If this switch is enabled, the destination file will be overwritten if it exists.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformanceCounter</maml:name><maml:description><maml:para>Specifies the performance counter path to log.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformanceCounterPath</maml:name><maml:description><maml:para>Specifies the pathname of the text file that lists the performance counters to be included in a relog file. Use this option to list counter paths in an input file, one per line. Default setting is all counters in the original log file are relogged.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Interval</maml:name><maml:description><maml:para>Specifies sample intervals in "n" records. Includes every nth data point in the relog file. Default is every data point.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BeginTime</maml:name><maml:description><maml:para>This is is Get-Date object and we format it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>Specifies end time for copying last record from the input file. This is is Get-Date object and we format it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigPath</maml:name><maml:description><maml:para>Specifies the pathname of the settings file that contains command-line parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Summary</maml:name><maml:description><maml:para>If this switch is enabled, the performance counters and time ranges of log files specified in the input file will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the output of Get-DbaPfDataCollector and Get-DbaPfDataCollectorSet as input via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Multithread</maml:name><maml:description><maml:para>If this switch is enabled, processing will be done in parallel. This may speed up large batches or large files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllTime</maml:name><maml:description><maml:para>If this switch is enabled and a datacollector or datacollectorset is passed in via the pipeline, collects all logs, not just the latest.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the results of the DOS command instead of Get-ChildItem will be displayed. This does not run in parallel.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllowClobber</maml:name><maml:description><maml:para>If this switch is enabled, the destination file will be overwritten if it exists.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllTime</maml:name><maml:description><maml:para>If this switch is enabled and a datacollector or datacollectorset is passed in via the pipeline, collects all logs, not just the latest.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Append</maml:name><maml:description><maml:para>If this switch is enabled, output will be appended to the specified file instead of overwriting. This option does not apply to SQL format where the default is always to append.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BeginTime</maml:name><maml:description><maml:para>This is is Get-Date object and we format it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigPath</maml:name><maml:description><maml:para>Specifies the pathname of the settings file that contains command-line parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Specifies the pathname of the output file or SQL database where the counters will be written. Defaults to the same directory as the source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>Specifies end time for copying last record from the input file. This is is Get-Date object and we format it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the output of Get-DbaPfDataCollector and Get-DbaPfDataCollectorSet as input via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Interval</maml:name><maml:description><maml:para>Specifies sample intervals in "n" records. Includes every nth data point in the relog file. Default is every data point.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Multithread</maml:name><maml:description><maml:para>If this switch is enabled, processing will be done in parallel. This may speed up large batches or large files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the pathname of an existing performance counter log or performance counter path. You can specify multiple input files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformanceCounter</maml:name><maml:description><maml:para>Specifies the performance counter path to log.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PerformanceCounterPath</maml:name><maml:description><maml:para>Specifies the pathname of the text file that lists the performance counters to be included in a relog file. Use this option to list counter paths in an input file, one per line. Default setting is all counters in the original log file are relogged.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the results of the DOS command instead of Get-ChildItem will be displayed. This does not run in parallel.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Summary</maml:name><maml:description><maml:para>If this switch is enabled, the performance counters and time ranges of log files specified in the input file will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The output format. Defaults to tsv. Options include tsv, csv, bin, and sql. For a SQL database, the output file specifies the DSN!counter_log. You can specify the database location by using the ODBC manager to configure the DSN (Database System Name). For more information, read here: https://technet.microsoft.com/en-us/library/bb490958.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, DataCollector, PerfCounter, Relog Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaPfRelog -Path C:\temp\perfmon.blg </dev:code><dev:remarks><maml:para> Creates C:\temp\perfmon.tsv from C:\temp\perfmon.blg. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaPfRelog -Path C:\temp\perfmon.blg -Destination C:\temp\a\b\c </dev:code><dev:remarks><maml:para> Creates the temp, a, and b directories if needed, then generates c.tsv (tab separated) from C:\temp\perfmon.blg. Returns the newly created file as a file object. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -ComputerName sql2016 | Get-DbaPfDataCollector | Invoke-DbaPfRelog -Destination C:\temp\perf </dev:code><dev:remarks><maml:para> Creates 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 avoid naming conflicts with piped input. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaPfRelog -Path C:\temp\perfmon.blg -Destination C:\temp\a\b\c -Raw </dev:code><dev:remarks><maml:para> >> [Invoke-DbaPfRelog][21:21:35] relog "C:\temp\perfmon.blg" -f csv -o C:\temp\a\b\c >> Input >> ---------------- >> File(s): >> C:\temp\perfmon.blg (Binary) >> Begin: 1/13/2018 5:13:23 >> End: 1/13/2018 14:29:55 >> Samples: 2227 >> 100.00% >> Output >> ---------------- >> File: C:\temp\a\b\c.csv >> Begin: 1/13/2018 5:13:23 >> End: 1/13/2018 14:29:55 >> Samples: 2227 >> The command completed successfully. Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaPfRelog -Path 'C:\temp\perflog with spaces.blg' -Destination C:\temp\a\b\c -Type csv -BeginTime ((Get-Date).AddDays(-30)) -EndTime ((Get-Date).AddDays(-1)) </dev:code><dev:remarks><maml:para> Creates the temp, a, and b directories if needed, then generates c.csv (comma separated) from C:\temp\perflog with spaces.blg', starts 30 days ago and ends one day ago. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaPfDataCollectorSet | Get-DbaPfDataCollector | Invoke-DbaPfRelog -Multithread -AllowClobber </dev:code><dev:remarks><maml:para> Relogs latest data files from all collectors within the servers listed in $servers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollector -Collector DataCollector01 | Invoke-DbaPfRelog -AllowClobber -AllTime </dev:code><dev:remarks><maml:para> Relogs all the log files from the DataCollector01 on the local computer and allows overwrite. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaPfRelog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaQuery</command:name><command:noun>DbaQuery</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>A command to run explicit T-SQL commands or files.</maml:para></maml:description></command:details><maml:description><maml:para>This function is a wrapper command around Invoke-DbaAsync, which in turn is based on Invoke-SqlCmd2.</maml:para><maml:para>It was designed to be more convenient to use in a pipeline and to behave in a way consistent with the rest of our functions.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaQuery</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to select before running the query. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Specifies one or more queries to be run. The queries can be Transact-SQL, XQuery statements, or sqlcmd commands. Multiple queries in a single batch may be separated by a semicolon or a GO Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject', 'PSObjectArray', and 'SingleValue'. PSObject and PSObjectArray output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameter</maml:name><maml:description><maml:para>Specifies a hashtable of parameters or output from New-DbaSqlParameter for parameterized SQL queries. http://blog.codinghorror.com/give-me-parameterized-sql-or-give-me-death/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandType</maml:name><maml:description><maml:para>Specifies the type of command represented by the query string. Valid options for this parameter are 'Text', 'TableDirect', and 'StoredProcedure'. Default is 'Text'. Further information: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtype</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Data.CommandType</command:parameterValue><dev:type><maml:name>System.Data.CommandType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendServerInstance</maml:name><maml:description><maml:para>If this switch is enabled, the SQL Server instance will be appended to PSObject and DataRow output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessagesToOutput</maml:name><maml:description><maml:para>Use this switch to have on the output stream messages too (e.g. PRINT statements). Output will hold the resultset too.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Execute the query with ReadOnly application intent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoExec</maml:name><maml:description><maml:para>Use this switch to prepend SET NOEXEC ON and append SET NOEXEC OFF to each statement, useful for checking query formal errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-DbaQuery</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to select before running the query. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlObject</maml:name><maml:description><maml:para>Specify one or more SQL objects. Those will be converted to script and their scripts run on the target system(s).</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject', 'PSObjectArray', and 'SingleValue'. PSObject and PSObjectArray output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameter</maml:name><maml:description><maml:para>Specifies a hashtable of parameters or output from New-DbaSqlParameter for parameterized SQL queries. http://blog.codinghorror.com/give-me-parameterized-sql-or-give-me-death/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandType</maml:name><maml:description><maml:para>Specifies the type of command represented by the query string. Valid options for this parameter are 'Text', 'TableDirect', and 'StoredProcedure'. Default is 'Text'. Further information: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtype</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Data.CommandType</command:parameterValue><dev:type><maml:name>System.Data.CommandType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendServerInstance</maml:name><maml:description><maml:para>If this switch is enabled, the SQL Server instance will be appended to PSObject and DataRow output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessagesToOutput</maml:name><maml:description><maml:para>Use this switch to have on the output stream messages too (e.g. PRINT statements). Output will hold the resultset too.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Execute the query with ReadOnly application intent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoExec</maml:name><maml:description><maml:para>Use this switch to prepend SET NOEXEC ON and append SET NOEXEC OFF to each statement, useful for checking query formal errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-DbaQuery</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to select before running the query. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>File</maml:name><maml:description><maml:para>Specifies the path to one or several files to be used as the query input.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject', 'PSObjectArray', and 'SingleValue'. PSObject and PSObjectArray output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameter</maml:name><maml:description><maml:para>Specifies a hashtable of parameters or output from New-DbaSqlParameter for parameterized SQL queries. http://blog.codinghorror.com/give-me-parameterized-sql-or-give-me-death/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandType</maml:name><maml:description><maml:para>Specifies the type of command represented by the query string. Valid options for this parameter are 'Text', 'TableDirect', and 'StoredProcedure'. Default is 'Text'. Further information: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtype</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Data.CommandType</command:parameterValue><dev:type><maml:name>System.Data.CommandType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendServerInstance</maml:name><maml:description><maml:para>If this switch is enabled, the SQL Server instance will be appended to PSObject and DataRow output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessagesToOutput</maml:name><maml:description><maml:para>Use this switch to have on the output stream messages too (e.g. PRINT statements). Output will hold the resultset too.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Execute the query with ReadOnly application intent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoExec</maml:name><maml:description><maml:para>Use this switch to prepend SET NOEXEC ON and append SET NOEXEC OFF to each statement, useful for checking query formal errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendServerInstance</maml:name><maml:description><maml:para>If this switch is enabled, the SQL Server instance will be appended to PSObject and DataRow output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject', 'PSObjectArray', and 'SingleValue'. PSObject and PSObjectArray output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandType</maml:name><maml:description><maml:para>Specifies the type of command represented by the query string. Valid options for this parameter are 'Text', 'TableDirect', and 'StoredProcedure'. Default is 'Text'. Further information: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtype</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Data.CommandType</command:parameterValue><dev:type><maml:name>System.Data.CommandType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to select before running the query. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>File</maml:name><maml:description><maml:para>Specifies the path to one or several files to be used as the query input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessagesToOutput</maml:name><maml:description><maml:para>Use this switch to have on the output stream messages too (e.g. PRINT statements). Output will hold the resultset too.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoExec</maml:name><maml:description><maml:para>Use this switch to prepend SET NOEXEC ON and append SET NOEXEC OFF to each statement, useful for checking query formal errors</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Specifies one or more queries to be run. The queries can be Transact-SQL, XQuery statements, or sqlcmd commands. Multiple queries in a single batch may be separated by a semicolon or a GO Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Execute the query with ReadOnly application intent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlObject</maml:name><maml:description><maml:para>Specify one or more SQL objects. Those will be converted to script and their scripts run on the target system(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameter</maml:name><maml:description><maml:para>Specifies a hashtable of parameters or output from New-DbaSqlParameter for parameterized SQL queries. http://blog.codinghorror.com/give-me-parameterized-sql-or-give-me-death/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Query, Utility Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaQuery -SqlInstance server\instance -Query 'SELECT foo FROM bar' </dev:code><dev:remarks><maml:para> Runs the sql query 'SELECT foo FROM bar' against the instance 'server\instance' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance [SERVERNAME] -Group [GROUPNAME] | Invoke-DbaQuery -Query 'SELECT foo FROM bar' </dev:code><dev:remarks><maml:para> Runs the sql query 'SELECT foo FROM bar' against all instances in the group [GROUPNAME] on the CMS [SERVERNAME] </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> "server1", "server1\nordwind", "server2" | Invoke-DbaQuery -File "C:\scripts\sql\rebuild.sql" </dev:code><dev:remarks><maml:para> Runs the sql commands stored in rebuild.sql against the instances "server1", "server1\nordwind" and "server2" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance "server1", "server1\nordwind", "server2" | Invoke-DbaQuery -File "C:\scripts\sql\rebuild.sql" </dev:code><dev:remarks><maml:para> Runs the sql commands stored in rebuild.sql against all accessible databases of the instances "server1", "server1\nordwind" and "server2" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaQuery -SqlInstance . -Query 'SELECT * FROM users WHERE Givenname = @name' -SqlParameter @{ Name = "Maria" } </dev:code><dev:remarks><maml:para> Executes a simple query against the users table using SQL Parameters. This avoids accidental SQL Injection and is the safest way to execute queries with dynamic content. Keep in mind the limitations inherent in parameters - it is quite impossible to use them for content references. While it is possible to parameterize a where condition, it is impossible to use this to select which columns to select. The inserted text will always be treated as string content, and not as a reference to any SQL entity (such as columns, tables or databases). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaQuery -SqlInstance aglistener1 -ReadOnly -Query "select something from readonlydb.dbo.atable" </dev:code><dev:remarks><maml:para> Executes a query with ReadOnly application intent on aglistener1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaQuery -SqlInstance server1 -Database tempdb -Query Example_SP -SqlParameter @{ Name = "Maria" } -CommandType StoredProcedure </dev:code><dev:remarks><maml:para> Executes a stored procedure Example_SP using SQL Parameters </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $queryParameters = @{ </dev:code><dev:remarks><maml:para> >> StartDate = $startdate >> EndDate = $enddate >> } PS C:\> Invoke-DbaQuery -SqlInstance server1 -Database tempdb -Query Example_SP -SqlParameter $queryParameters -CommandType StoredProcedure Executes a stored procedure Example_SP using multiple SQL Parameters </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $inparam = @() </dev:code><dev:remarks><maml:para> PS C:\> $inparam += [pscustomobject]@{ >> somestring = 'string1' >> somedate = '2021-07-15T01:02:00' >> } PS C:\> $inparam += [pscustomobject]@{ >> somestring = 'string2' >> somedate = '2021-07-15T02:03:00' >> } >> $inparamAsDataTable = ConvertTo-DbaDataTable -InputObject $inparam PS C:\> New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype' PS C:\> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable Creates an TVP input parameter and uses it to invoke a stored procedure. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $output PS C:\> $output.Value Creates an output parameter and uses it to invoke a stored procedure. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance localhost -Database master -AlwaysEncrypted </dev:code><dev:remarks><maml:para> PS C:\> $inputparamSSN = New-DbaSqlParameter -Direction Input -ParameterName "@SSN" -DbType AnsiStringFixedLength -Size 11 -SqlValue "444-44-4444" -ForceColumnEncryption PS C:\> Invoke-DbaQuery -SqlInstance $server -Query 'SELECT * FROM bar WHERE SSN_col = @SSN' -SqlParameter @inputparamSSN Creates an input parameter using Always Encrypted </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaQuery</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbatoolsFormatter</command:name><command:noun>DbatoolsFormatter</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Helps formatting function files to dbatools' standards</maml:para></maml:description></command:details><maml:description><maml:para>Uses PSSA's Invoke-Formatter to format the target files and saves it without the BOM.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbatoolsFormatter</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the ps1 file that needs to be formatted</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the ps1 file that needs to be formatted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Support Author: Simone Bizzotto Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbatoolsFormatter -Path C:\dbatools\functions\Get-DbaDatabase.ps1 </dev:code><dev:remarks><maml:para> Reformats C:\dbatools\functions\Get-DbaDatabase.ps1 to dbatools' standards </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbatoolsFormatter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbatoolsRenameHelper</command:name><command:noun>DbatoolsRenameHelper</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Older dbatools command names have been changed. This script helps keep up.</maml:para></maml:description></command:details><maml:description><maml:para>Older dbatools command names have been changed. This script helps keep up.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbatoolsRenameHelper</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped in object from Get-ChildItem</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Encoding</maml:name><maml:description><maml:para>Specifies the file encoding. The default is UTF8. Valid values are: -- ASCII: Uses the encoding for the ASCII (7-bit) character set. -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order. -- Byte: Encodes a set of characters into a sequence of bytes. -- String: Uses the encoding type for a string. -- Unicode: Encodes in UTF-16 format using the little-endian byte order. -- UTF7: Encodes in UTF-7 format. -- UTF8: Encodes in UTF-8 format. -- Unknown: The encoding type is unknown or invalid. The data can be treated as binary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A piped in object from Get-ChildItem</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo[]</command:parameterValue><dev:type><maml:name>System.IO.FileInfo[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem C:\temp\ps\*.ps1 -Recurse | Invoke-DbatoolsRenameHelper </dev:code><dev:remarks><maml:para> Checks to see if any ps1 file in C:\temp\ps matches an old command name. If so, then the command name within the text is updated and the resulting changes are written to disk in UTF-8. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem C:\temp\ps\*.ps1 -Recurse | Invoke-DbatoolsRenameHelper -Encoding Ascii -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command would run. If the command would run and there were matches, the resulting changes would be written to disk as Ascii encoded. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbatoolsRenameHelper</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaWhoIsActive</command:name><command:noun>DbaWhoIsActive</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>Outputs results of Adam Machanic's sp_WhoIsActive DataTable</maml:para></maml:description></command:details><maml:description><maml:para>Output results of Adam Machanic's sp_WhoIsActive</maml:para><maml:para>This command was built with Adam's permission. To read more about sp_WhoIsActive, please visit:</maml:para><maml:para>Updates: http://sqlblog.com/blogs/adam_machanic/archive/tags/who+is+active/default.aspx</maml:para><maml:para>Also, consider donating to Adam if you find this stored procedure helpful: http://tinyurl.com/WhoIsActiveDonate</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaWhoIsActive</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where sp_WhoIsActive is installed. Defaults to master. If the sp_WhoIsActive is not installed, the command will warn and exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>FiltersBoth inclusive and exclusive Set either filter to '' to disable Session is a session ID, and either 0 or '' can be used to indicate "all" sessions All other filter types support % or _ as wildcards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterType</maml:name><maml:description><maml:para>Valid filter types are: session, program, database, login, and host</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotFilter</maml:name><maml:description><maml:para>FiltersBoth inclusive and exclusive Set either filter to '' to disable Session is a session ID, and either 0 or '' can be used to indicate "all" sessions All other filter types support % or _ as wildcards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotFilterType</maml:name><maml:description><maml:para>Valid filter types are: session, program, database, login, and host</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowOwnSpid</maml:name><maml:description><maml:para>Retrieve data about the calling session?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowSystemSpids</maml:name><maml:description><maml:para>Retrieve data about system sessions?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowSleepingSpids</maml:name><maml:description><maml:para>Controls how sleeping SPIDs are handled, based on the idea of levels of interest 0 does not pull any sleeping SPIDs 1 pulls only those sleeping SPIDs that also have an open transaction 2 pulls all sleeping SPIDs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetFullInnerText</maml:name><maml:description><maml:para>If 1, gets the full stored procedure or running batch, when available If 0, gets only the actual statement that is currently running in the batch or procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetPlans</maml:name><maml:description><maml:para>Get associated query plans for running tasks, if available If 1, gets the plan based on the request's statement offset If 2, gets the entire plan based on the request's plan_handle</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetOuterCommand</maml:name><maml:description><maml:para>Get the associated outer ad hoc query or stored procedure call, if available</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetTransactionInfo</maml:name><maml:description><maml:para>Enables pulling transaction log write info and transaction duration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetTaskInfo</maml:name><maml:description><maml:para>Get information on active tasks, based on three interest levels Level 0 does not pull any task-related information Level 1 is a lightweight mode that pulls the top non-CXPACKET wait, giving preference to blockers Level 2 pulls all available task-based metrics, including: number of active tasks, current wait stats, physical I/O, context switches, and blocker information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetLocks</maml:name><maml:description><maml:para>Gets associated locks for each request, aggregated in an XML format</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetAverageTime</maml:name><maml:description><maml:para>Get average time for past runs of an active query (based on the combination of plan handle, sql handle, and offset)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetAdditonalInfo</maml:name><maml:description><maml:para>Get additional non-performance-related information about the session or request text_size, language, date_format, date_first, quoted_identifier, arithabort, ansi_null_dflt_on, ansi_defaults, ansi_warnings, ansi_padding, ansi_nulls, concat_null_yields_null, transaction_isolation_level, lock_timeout, deadlock_priority, row_count, command_type If a SQL Agent job is running, an subnode called agent_info will be populated with some or all of the following: job_id, job_name, step_id, step_name, msdb_query_error (in the event of an error) If @get_task_info is set to 2 and a lock wait is detected, a subnode called block_info will be populated with some or all of the following: lock_type, database_name, object_id, file_id, hobt_id, applock_hash, metadata_resource, metadata_class_id, object_name, schema_name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FindBlockLeaders</maml:name><maml:description><maml:para>Walk the blocking chain and count the number of total SPIDs blocked all the way down by a given session Also enables task_info Level 1, if @get_task_info is set to 0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeltaInterval</maml:name><maml:description><maml:para>Pull deltas on various metrics Interval in seconds to wait before doing the second data pull</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumnList</maml:name><maml:description><maml:para>List of desired output columns, in desired order Note that the final output will be the intersection of all enabled features and all columns in the list. Therefore, only columns associated with enabled features will actually appear in the output. Likewise, removing columns from this list may effectively disable features, even if they are turned on Each element in this list must be one of the valid output column names. Names must be delimited by square brackets. White space, formatting, and additional characters are allowed, as long as the list contains exact matches of delimited valid column names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SortOrder</maml:name><maml:description><maml:para>Column(s) by which to sort output, optionally with sort directions. Valid column choices: session_id, physical_io, reads, physical_reads, writes, tempdb_allocations, tempdb_current, CPU, context_switches, used_memory, physical_io_delta, reads_delta, physical_reads_delta, writes_delta, tempdb_allocations_delta, tempdb_current_delta, CPU_delta, context_switches_delta, used_memory_delta, tasks, tran_start_time, open_tran_count, blocking_session_id, blocked_session_count, percent_complete, host_name, login_name, database_name, start_time, login_time Note that column names in the list must be bracket-delimited. Commas and/or white space are not required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatOutput</maml:name><maml:description><maml:para>Formats some of the output columns in a more "human readable" form 0 disables output format 1 formats the output for variable-width fonts 2 formats the output for fixed-width fonts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>If set to a non-blank value, the script will attempt to insert into the specified destination table. Please note that the script will not verify that the table exists, or that it has the correct schema, before doing the insert. Table can be specified in one, two, or three-part format</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReturnSchema</maml:name><maml:description><maml:para>If set to 1, no data collection will happen and no result set will be returned; instead, a CREATE TABLE statement will be returned via the @schema parameter, which will match the schema of the result set that would be returned by using the same collection of the rest of the parameters. The CREATE TABLE statement will have a placeholder token of <table_name> in place of an actual table name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>If set to 1, no data collection will happen and no result set will be returned; instead, a CREATE TABLE statement will be returned via the @schema parameter, which will match the schema of the result set that would be returned by using the same collection of the rest of the parameters. The CREATE TABLE statement will have a placeholder token of <table_name> in place of an actual table name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Help</maml:name><maml:description><maml:para>Help! What do I do?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject'. Default is 'DataRow'. PSObject output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>As</maml:name><maml:description><maml:para>Specifies output type. Valid options for this parameter are 'DataSet', 'DataTable', 'DataRow', 'PSObject'. Default is 'DataRow'. PSObject output introduces overhead but adds flexibility for working with results: https://forums.powershell.org/t/dealing-with-dbnull/2328/2</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where sp_WhoIsActive is installed. Defaults to master. If the sp_WhoIsActive is not installed, the command will warn and exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeltaInterval</maml:name><maml:description><maml:para>Pull deltas on various metrics Interval in seconds to wait before doing the second data pull</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationTable</maml:name><maml:description><maml:para>If set to a non-blank value, the script will attempt to insert into the specified destination table. Please note that the script will not verify that the table exists, or that it has the correct schema, before doing the insert. Table can be specified in one, two, or three-part format</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>FiltersBoth inclusive and exclusive Set either filter to '' to disable Session is a session ID, and either 0 or '' can be used to indicate "all" sessions All other filter types support % or _ as wildcards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterType</maml:name><maml:description><maml:para>Valid filter types are: session, program, database, login, and host</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FindBlockLeaders</maml:name><maml:description><maml:para>Walk the blocking chain and count the number of total SPIDs blocked all the way down by a given session Also enables task_info Level 1, if @get_task_info is set to 0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatOutput</maml:name><maml:description><maml:para>Formats some of the output columns in a more "human readable" form 0 disables output format 1 formats the output for variable-width fonts 2 formats the output for fixed-width fonts</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetAdditonalInfo</maml:name><maml:description><maml:para>Get additional non-performance-related information about the session or request text_size, language, date_format, date_first, quoted_identifier, arithabort, ansi_null_dflt_on, ansi_defaults, ansi_warnings, ansi_padding, ansi_nulls, concat_null_yields_null, transaction_isolation_level, lock_timeout, deadlock_priority, row_count, command_type If a SQL Agent job is running, an subnode called agent_info will be populated with some or all of the following: job_id, job_name, step_id, step_name, msdb_query_error (in the event of an error) If @get_task_info is set to 2 and a lock wait is detected, a subnode called block_info will be populated with some or all of the following: lock_type, database_name, object_id, file_id, hobt_id, applock_hash, metadata_resource, metadata_class_id, object_name, schema_name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetAverageTime</maml:name><maml:description><maml:para>Get average time for past runs of an active query (based on the combination of plan handle, sql handle, and offset)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetFullInnerText</maml:name><maml:description><maml:para>If 1, gets the full stored procedure or running batch, when available If 0, gets only the actual statement that is currently running in the batch or procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetLocks</maml:name><maml:description><maml:para>Gets associated locks for each request, aggregated in an XML format</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetOuterCommand</maml:name><maml:description><maml:para>Get the associated outer ad hoc query or stored procedure call, if available</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetPlans</maml:name><maml:description><maml:para>Get associated query plans for running tasks, if available If 1, gets the plan based on the request's statement offset If 2, gets the entire plan based on the request's plan_handle</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetTaskInfo</maml:name><maml:description><maml:para>Get information on active tasks, based on three interest levels Level 0 does not pull any task-related information Level 1 is a lightweight mode that pulls the top non-CXPACKET wait, giving preference to blockers Level 2 pulls all available task-based metrics, including: number of active tasks, current wait stats, physical I/O, context switches, and blocker information</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetTransactionInfo</maml:name><maml:description><maml:para>Enables pulling transaction log write info and transaction duration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Help</maml:name><maml:description><maml:para>Help! What do I do?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotFilter</maml:name><maml:description><maml:para>FiltersBoth inclusive and exclusive Set either filter to '' to disable Session is a session ID, and either 0 or '' can be used to indicate "all" sessions All other filter types support % or _ as wildcards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotFilterType</maml:name><maml:description><maml:para>Valid filter types are: session, program, database, login, and host</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumnList</maml:name><maml:description><maml:para>List of desired output columns, in desired order Note that the final output will be the intersection of all enabled features and all columns in the list. Therefore, only columns associated with enabled features will actually appear in the output. Likewise, removing columns from this list may effectively disable features, even if they are turned on Each element in this list must be one of the valid output column names. Names must be delimited by square brackets. White space, formatting, and additional characters are allowed, as long as the list contains exact matches of delimited valid column names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReturnSchema</maml:name><maml:description><maml:para>If set to 1, no data collection will happen and no result set will be returned; instead, a CREATE TABLE statement will be returned via the @schema parameter, which will match the schema of the result set that would be returned by using the same collection of the rest of the parameters. The CREATE TABLE statement will have a placeholder token of <table_name> in place of an actual table name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>If set to 1, no data collection will happen and no result set will be returned; instead, a CREATE TABLE statement will be returned via the @schema parameter, which will match the schema of the result set that would be returned by using the same collection of the rest of the parameters. The CREATE TABLE statement will have a placeholder token of <table_name> in place of an actual table name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowOwnSpid</maml:name><maml:description><maml:para>Retrieve data about the calling session?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowSleepingSpids</maml:name><maml:description><maml:para>Controls how sleeping SPIDs are handled, based on the idea of levels of interest 0 does not pull any sleeping SPIDs 1 pulls only those sleeping SPIDs that also have an open transaction 2 pulls all sleeping SPIDs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShowSystemSpids</maml:name><maml:description><maml:para>Retrieve data about system sessions?</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SortOrder</maml:name><maml:description><maml:para>Column(s) by which to sort output, optionally with sort directions. Valid column choices: session_id, physical_io, reads, physical_reads, writes, tempdb_allocations, tempdb_current, CPU, context_switches, used_memory, physical_io_delta, reads_delta, physical_reads_delta, writes_delta, tempdb_allocations_delta, tempdb_current_delta, CPU_delta, context_switches_delta, used_memory_delta, tasks, tran_start_time, open_tran_count, blocking_session_id, blocked_session_count, percent_complete, host_name, login_name, database_name, start_time, login_time Note that column names in the list must be bracket-delimited. Commas and/or white space are not required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, WhoIsActive Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT http://whoisactive.com </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaWhoIsActive -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Execute sp_whoisactive on sqlserver2014a. This command expects sp_WhoIsActive to be in the master database. Logs into the SQL Server with Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaWhoIsActive -SqlInstance sqlserver2014a -SqlCredential $credential -Database dbatools </dev:code><dev:remarks><maml:para> Execute sp_whoisactive on sqlserver2014a. This command expects sp_WhoIsActive to be in the dbatools database. Logs into the SQL Server with SQL Authentication. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaWhoIsActive -SqlInstance sqlserver2014a -GetAverageTime </dev:code><dev:remarks><maml:para> Similar to running sp_WhoIsActive @get_avg_time </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Invoke-DbaWhoIsActive -SqlInstance sqlserver2014a -GetOuterCommand -FindBlockLeaders </dev:code><dev:remarks><maml:para> Similar to running sp_WhoIsActive @get_outer_command = 1, @find_block_leaders = 1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaWhoIsActive</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Invoke-DbaXEReplay</command:name><command:noun>DbaXEReplay</command:noun><command:verb>Invoke</command:verb><maml:description><maml:para>This command replays events from Read-DbaXEFile on one or more target servers</maml:para></maml:description></command:details><maml:description><maml:para>This command replays events from Read-DbaXEFile. It is simplistic in its approach.</maml:para><maml:para>- Writes all queries to a temp sql file</maml:para><maml:para>- Executes temp file using . $sqlcmd so that batches are executed properly</maml:para><maml:para>- Deletes temp file</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-DbaXEReplay</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The initial starting database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output of Read-DbaXESession.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>By dafault, the results of . $sqlcmd are collected, cleaned up and displayed. If you'd like to see all results immeidately, use Raw.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The initial starting database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output of Read-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>By dafault, the results of . $sqlcmd are collected, cleaned up and displayed. If you'd like to see all results immeidately, use Raw.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target SQL Server(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaXEFile -Path C:\temp\sample.xel | Invoke-DbaXEReplay -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Runs all batch_text for sql_batch_completed against tempdb on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaXEFile -Path C:\temp\sample.xel | Invoke-DbaXEReplay -SqlInstance sql2017 -Database planning -Event sql_batch_completed </dev:code><dev:remarks><maml:para> Sets the *initial* database to planning then runs only sql_batch_completed against sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaXEFile -Path C:\temp\sample.xel | Invoke-DbaXEReplay -SqlInstance sql2017, sql2016 </dev:code><dev:remarks><maml:para> Runs all batch_text for sql_batch_completed against tempdb on sql2017 and sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Invoke-DbaXEReplay</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Join-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Join</command:verb><maml:description><maml:para>Joins a secondary replica to an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Joins a secondary replica to an availability group on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Join-DbaAvailabilityGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group to join.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: External, Wsfc or None.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group to join.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: External, Wsfc or None.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql01 -AvailabilityGroup SharePoint | Join-DbaAvailabilityGroup -SqlInstance sql02 </dev:code><dev:remarks><maml:para> Joins sql02 to the SharePoint availability group on sql01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $ag = Get-DbaAvailabilityGroup -SqlInstance sql01 -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> PS C:\> Join-DbaAvailabilityGroup -SqlInstance sql02 -InputObject $ag Joins sql02 to the SharePoint availability group on sql01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql01 -AvailabilityGroup SharePoint | Join-DbaAvailabilityGroup -SqlInstance sql02 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were to run. No actions are actually performed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql01 -AvailabilityGroup SharePoint | Join-DbaAvailabilityGroup -SqlInstance sql02 -Confirm </dev:code><dev:remarks><maml:para> Prompts for confirmation then joins sql02 to the SharePoint availability group on sql01. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Join-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Join-DbaPath</command:name><command:noun>DbaPath</command:noun><command:verb>Join</command:verb><maml:description><maml:para>Performs multisegment path joins.</maml:para></maml:description></command:details><maml:description><maml:para>Performs multisegment path joins.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Join-DbaPath</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The basepath to join on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Optional -- tests to see if destination SQL Server is Linux or Windows</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Child</maml:name><maml:description><maml:para>Any number of child paths to add.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Child</maml:name><maml:description><maml:para>Any number of child paths to add.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The basepath to join on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Optional -- tests to see if destination SQL Server is Linux or Windows</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Path, Utility Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Join-DbaPath -Path 'C:\temp' 'Foo' 'Bar' </dev:code><dev:remarks><maml:para> Returns 'C:\temp\Foo\Bar' on windows. Returns 'C:/temp/Foo/Bar' on non-windows. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Join-DbaPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Measure-DbaBackupThroughput</command:name><command:noun>DbaBackupThroughput</command:noun><command:verb>Measure</command:verb><maml:description><maml:para>Determines how quickly SQL Server is backing up databases to media.</maml:para></maml:description></command:details><maml:description><maml:para>Returns backup history details for one or more databases on a SQL Server.</maml:para><maml:para>Output looks like this:</maml:para><maml:para>SqlInstance : sql2016</maml:para><maml:para>Database : SharePoint_Config</maml:para><maml:para>AvgThroughput : 1.07 MB</maml:para><maml:para>AvgSize : 24.17</maml:para><maml:para>AvgDuration : 00:00:01.1000000</maml:para><maml:para>MinThroughput : 0.02 MB</maml:para><maml:para>MaxThroughput : 2.26 MB</maml:para><maml:para>MinBackupDate : 8/6/2015 10:22:01 PM</maml:para><maml:para>MaxBackupDate : 6/19/2016 12:57:45 PM</maml:para><maml:para>BackupCount : 10</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Measure-DbaBackupThroughput</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>All backups taken on or after the point in time represented by this datetime object will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, only the last backup will be measured.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>By default, this command measures the speed of Full backups. Valid options are "Full", "Log" and "Differential".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies one or more DeviceTypes to use in filtering backup sets. Valid values are "Disk", "Permanent Disk Device", "Tape", "Permanent Tape Device", "Pipe", "Permanent Pipe Device" and "Virtual Device", as well as custom integers for your own DeviceTypes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies one or more DeviceTypes to use in filtering backup sets. Valid values are "Disk", "Permanent Disk Device", "Tape", "Permanent Tape Device", "Pipe", "Permanent Pipe Device" and "Virtual Device", as well as custom integers for your own DeviceTypes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Last</maml:name><maml:description><maml:para>If this switch is enabled, only the last backup will be measured.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Since</maml:name><maml:description><maml:para>All backups taken on or after the point in time represented by this datetime object will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>By default, this command measures the speed of Full backups. Valid options are "Full", "Log" and "Differential".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, Database Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Parses every backup in msdb's backuphistory for stats on all databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2016 -Database AdventureWorks2014 </dev:code><dev:remarks><maml:para> Parses every backup in msdb's backuphistory for stats on AdventureWorks2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2005 -Last </dev:code><dev:remarks><maml:para> Processes the last full, diff and log backups every backup for all databases on sql2005. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2005 -Last -Type Log </dev:code><dev:remarks><maml:para> Processes the last log backups every backup for all databases on sql2005. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2016 -Since (Get-Date).AddDays(-7) | Where-Object { $_.MinThroughput.Gigabyte -gt 1 } </dev:code><dev:remarks><maml:para> Gets backup calculations for the last week and filters results that have a minimum of 1GB throughput </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaBackupThroughput -SqlInstance sql2016 -Since (Get-Date).AddDays(-365) -Database bigoldb </dev:code><dev:remarks><maml:para> Gets backup calculations, limited to the last year and only the bigoldb database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Measure-DbaBackupThroughput</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Measure-DbaDbVirtualLogFile</command:name><command:noun>DbaDbVirtualLogFile</command:noun><command:verb>Measure</command:verb><maml:description><maml:para>Returns calculations on the database virtual log files for database on a SQL instance.</maml:para></maml:description></command:details><maml:description><maml:para>Having a transaction log file with too many virtual log files (VLFs) can hurt database performance.</maml:para><maml:para>Too 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.</maml:para><maml:para>References:</maml:para><maml:para>http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/</maml:para><maml:para>http://blogs.msdn.com/b/saponsqlserver/archive/2012/02/22/too-many-virtual-log-files-vlfs-can-cause-slow-database-recovery.aspx</maml:para><maml:para>If you've got a high number of VLFs, you can use Expand-SqlTLogResponsibly to reduce the number.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Measure-DbaDbVirtualLogFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>If this switch is enabled, system database information will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDBs</maml:name><maml:description><maml:para>If this switch is enabled, system database information will be displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, VLF, LogFile Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaDbVirtualLogFile -SqlInstance sqlcluster </dev:code><dev:remarks><maml:para> Returns all user database virtual log file counts for the sqlcluster instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaDbVirtualLogFile -SqlInstance sqlserver | Where-Object {$_.Total -ge 50} </dev:code><dev:remarks><maml:para> Returns user databases that have 50 or more VLFs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> @('sqlserver','sqlcluster') | Measure-DbaDbVirtualLogFile </dev:code><dev:remarks><maml:para> Returns all VLF information for the sqlserver and sqlcluster SQL Server instances. Processes data via the pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaDbVirtualLogFile -SqlInstance sqlcluster -Database db1, db2 </dev:code><dev:remarks><maml:para> Returns VLF counts for the db1 and db2 databases on sqlcluster. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Measure-DbaDbVirtualLogFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Measure-DbaDiskSpaceRequirement</command:name><command:noun>DbaDiskSpaceRequirement</command:noun><command:verb>Measure</command:verb><maml:description><maml:para>Calculate the space needed to copy and possibly replace a database from one SQL server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>This 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Measure-DbaDiskSpaceRequirement</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy. It MUST exist.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database name at destination. May or may not be present, if unspecified it will default to the database name provided in SourceDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use to connect via CIM/WMI/PowerShell remoting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use to connect via CIM/WMI/PowerShell remoting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy. It MUST exist.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database name at destination. May or may not be present, if unspecified it will default to the database name provided in SourceDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Storage, Space, Database Author: Pollus Brodeur (@pollusb) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbaDiskSpaceRequirement -Source INSTANCE1 -Database DB1 -Destination INSTANCE2 </dev:code><dev:remarks><maml:para> Calculate space needed for a simple migration with one database with the same name at destination. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> @( </dev:code><dev:remarks><maml:para> >> [PSCustomObject]@{Source='SQL1';Destination='SQL2';Database='DB1'}, >> [PSCustomObject]@{Source='SQL1';Destination='SQL2';Database='DB2'} >> ) | Measure-DbaDiskSpaceRequirement Using a PSCustomObject with 2 databases to migrate on SQL2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-Csv -Path .\migration.csv -Delimiter "`t" | Measure-DbaDiskSpaceRequirement | Format-Table -AutoSize </dev:code><dev:remarks><maml:para> Using a CSV file. You will need to use this header line "Source<tab>Destination<tab>Database<tab>DestinationDatabase". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $qry = "SELECT Source, Destination, Database FROM dbo.Migrations" </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaCmd -SqlInstance DBA -Database Migrations -Query $qry | Measure-DbaDiskSpaceRequirement Using a SQL table. We are DBA after all! </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Measure-DbaDiskSpaceRequirement</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Measure-DbatoolsImport</command:name><command:noun>DbatoolsImport</command:noun><command:verb>Measure</command:verb><maml:description><maml:para>Displays the import load times of the dbatools PowerShell module</maml:para></maml:description></command:details><maml:description><maml:para>Displays the import load times of the dbatools PowerShell module</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Measure-DbatoolsImport</maml:name></command:syntaxItem></command:syntax><command:parameters></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Support Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Measure-DbatoolsImport </dev:code><dev:remarks><maml:para> Displays the import load times of the dbatools PowerShell module </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Import-Module dbatools </dev:code><dev:remarks><maml:para> PS C:\> Measure-DbatoolsImport Displays the import load times of the dbatools PowerShell module </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Measure-DbatoolsImport</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Mount-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Mount</command:verb><maml:description><maml:para>Attach a SQL Server Database - aliased to Attach-DbaDatabase</maml:para></maml:description></command:details><maml:description><maml:para>This command will attach a SQL Server database.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Mount-DbaDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to attach.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStructure</maml:name><maml:description><maml:para>A StringCollection object value that contains a list database files. If FileStructure is not specified, BackupHistory will be used to guess the structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Collections.Specialized.StringCollection</command:parameterValue><dev:type><maml:name>System.Collections.Specialized.StringCollection</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseOwner</maml:name><maml:description><maml:para>Sets the database owner for the database. The sa account (or equivalent) will be used if DatabaseOwner is not specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AttachOption</maml:name><maml:description><maml:para>An AttachOptions object value that contains the attachment options. Valid options are "None", "RebuildLog", "EnableBroker", "NewBroker" and "ErrorBrokerConversations".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AttachOption</maml:name><maml:description><maml:para>An AttachOptions object value that contains the attachment options. Valid options are "None", "RebuildLog", "EnableBroker", "NewBroker" and "ErrorBrokerConversations".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to attach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseOwner</maml:name><maml:description><maml:para>Sets the database owner for the database. The sa account (or equivalent) will be used if DatabaseOwner is not specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStructure</maml:name><maml:description><maml:para>A StringCollection object value that contains a list database files. If FileStructure is not specified, BackupHistory will be used to guess the structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Collections.Specialized.StringCollection</command:parameterValue><dev:type><maml:name>System.Collections.Specialized.StringCollection</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Attach, Database Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $fileStructure = New-Object System.Collections.Specialized.StringCollection </dev:code><dev:remarks><maml:para> PS C:\> $fileStructure.Add("E:\archive\example.mdf") PS C:\> $filestructure.Add("E:\archive\example.ldf") PS C:\> $filestructure.Add("E:\archive\example.ndf") PS C:\> Mount-DbaDatabase -SqlInstance sql2016 -Database example -FileStructure $fileStructure Attaches 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 option is None. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Mount-DbaDatabase -SqlInstance sql2016 -Database example </dev:code><dev:remarks><maml:para> Since 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Mount-DbaDatabase -SqlInstance sql2016 -Database example -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed (without actually performing the command) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Mount-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Move-DbaDbFile</command:name><command:noun>DbaDbFile</command:noun><command:verb>Move</command:verb><maml:description><maml:para>Moves database files from one local drive or folder to another.</maml:para></maml:description></command:details><maml:description><maml:para>Moves database files from one local drive or folder to another.</maml:para><maml:para>It will put database offline, update metadata and set it online again.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Move-DbaDbFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to be moved.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Define the file type to move; accepted values: Data, Log or Both. Default value: Both Exclusive, cannot be used in conjunction with FileToMove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileDestination</maml:name><maml:description><maml:para>Destination directory of the database file(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteAfterMove</maml:name><maml:description><maml:para>Remove the source database file(s) after the successful move operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Database(s) is set offline as part of the move process, this will utilize WITH ROLLBACK IMMEDIATE and rollback any open transaction running against the database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Move-DbaDbFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to be moved.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileToMove</maml:name><maml:description><maml:para>Pass a hashtable that contains a list of database files and their destination path. Key and value should be the logical name and then the path (e.g. 'db1_log' = 'D:\mssql\logs')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteAfterMove</maml:name><maml:description><maml:para>Remove the source database file(s) after the successful move operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Database(s) is set offline as part of the move process, this will utilize WITH ROLLBACK IMMEDIATE and rollback any open transaction running against the database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Move-DbaDbFile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to be moved.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStructureOnly</maml:name><maml:description><maml:para>Return a hashtable of the Database file structure. Modifying the hashtable it can then be utilized with the FileToMove parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Database(s) is set offline as part of the move process, this will utilize WITH ROLLBACK IMMEDIATE and rollback any open transaction running against the database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to be moved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteAfterMove</maml:name><maml:description><maml:para>Remove the source database file(s) after the successful move operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileDestination</maml:name><maml:description><maml:para>Destination directory of the database file(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStructureOnly</maml:name><maml:description><maml:para>Return a hashtable of the Database file structure. Modifying the hashtable it can then be utilized with the FileToMove parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileToMove</maml:name><maml:description><maml:para>Pass a hashtable that contains a list of database files and their destination path. Key and value should be the logical name and then the path (e.g. 'db1_log' = 'D:\mssql\logs')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Define the file type to move; accepted values: Data, Log or Both. Default value: Both Exclusive, cannot be used in conjunction with FileToMove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Database(s) is set offline as part of the move process, this will utilize WITH ROLLBACK IMMEDIATE and rollback any open transaction running against the database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Move, File Author: Claudio Silva (@claudioessilva), claudioeesilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Move-DbaDbFile -SqlInstance sql2017 -Database dbatools -FileType Data -FileDestination D:\DATA2 </dev:code><dev:remarks><maml:para> Copy all data files of dbatools database on sql2017 instance to the "D:\DATA2" path. Before it puts database offline and after copy each file will update database metadata and it ends by set the database back online </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $fileToMove=@{ </dev:code><dev:remarks><maml:para> >> 'dbatools'='D:\DATA3' >> 'dbatools_log'='D:\LOG2' >> } PS C:\> Move-DbaDbFile -SqlInstance sql2019 -Database dbatools -FileToMove $fileToMove Declares a hashtable that says for each logical file the new path. Copy each dbatools database file referenced on the hashtable on the sql2019 instance from the current location to the new mentioned location (D:\DATA3 and D:\LOG2 paths). Before it puts database offline and after copy each file will update database metadata and it ends by set the database back online </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Move-DbaDbFile -SqlInstance sql2017 -Database dbatools -FileStructureOnly </dev:code><dev:remarks><maml:para> Shows the current database file structure (without filenames). Example: 'dbatools'='D:\Data' </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Move-DbaDbFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Move-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Move</command:verb><maml:description><maml:para>Moves registered servers around SQL Server Central Management Server (CMS). Local Registered Servers not currently supported.</maml:para></maml:description></command:details><maml:description><maml:para>Moves registered servers around SQL Server Central Management Server (CMS). Local Registered Servers not currently supported.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Move-DbaRegServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more reg servers to move. Name is the visible name in SSMS CMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more reg servers to move. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>The new group. If no new group is specified, the default root will used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServer to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>The new group. If no new group is specified, the default root will used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServer to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more reg servers to move. Name is the visible name in SSMS CMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more reg servers to move. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Move-DbaRegServer -SqlInstance sql2012 -Name 'Web SQL Cluster' -Group HR\Prod </dev:code><dev:remarks><maml:para> Moves the registered server on sql2012 titled 'Web SQL Cluster' to the Prod group within the HR group </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2017 -Name 'Web SQL Cluster' | Move-DbaRegServer -Group Web </dev:code><dev:remarks><maml:para> Moves the registered server 'Web SQL Cluster' on sql2017 to the Web group, also on sql2017 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Move-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Move-DbaRegServerGroup</command:name><command:noun>DbaRegServerGroup</command:noun><command:verb>Move</command:verb><maml:description><maml:para>Moves registered server groups around SQL Server Central Management Server (CMS). Local Registered Server Groups not currently supported.</maml:para></maml:description></command:details><maml:description><maml:para>Moves registered server groups around SQL Server Central Management Server (CMS). Local Registered Server Groups not currently supported.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Move-DbaRegServerGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewGroup</maml:name><maml:description><maml:para>The new location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewGroup</maml:name><maml:description><maml:para>The new location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Move-DbaRegServerGroup -SqlInstance sql2012 -Group HR\Development -NewGroup AD\Prod </dev:code><dev:remarks><maml:para> Moves the Development group within HR to the Prod group within AD </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sql2017 -Group HR\Development| Move-DbaRegServerGroup -NewGroup Web </dev:code><dev:remarks><maml:para> Moves the Development group within HR to the Web group </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Move-DbaRegServerGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentAlertCategory</command:name><command:noun>DbaAgentAlertCategory</command:noun><command:verb>New</command:verb><maml:description><maml:para>New-DbaAgentAlertCategory creates a new alert category.</maml:para></maml:description></command:details><maml:description><maml:para>New-DbaAgentAlertCategory makes it possible to create a Agent Alert category that can be used with Alerts.</maml:para><maml:para>It returns an array of the alert categories created .</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentAlertCategory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert, AlertCategory Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentAlertCategory -SqlInstance sql1 -Category 'Category 1' </dev:code><dev:remarks><maml:para> Creates a new alert category with the name 'Category 1'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1' | New-DbaAgentAlertCategory -Category 'Category 2' </dev:code><dev:remarks><maml:para> Creates a new alert category with the name 'Category 2'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentAlertCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>New</command:verb><maml:description><maml:para>New-DbaAgentJob creates a new job</maml:para></maml:description></command:details><maml:description><maml:para>New-DbaAgentJob makes is possible to create a job in the SQL Server Agent.</maml:para><maml:para>It returns an array of the job(s) created</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentJob</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job. The name must be unique and cannot contain the percent (%) character.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Schedule to attach to job. This can be more than one schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleId</maml:name><maml:description><maml:para>Schedule ID to attach to job. This can be more than one schedule ID.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Sets the status of the job to disabled. By default a job is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartStepId</maml:name><maml:description><maml:para>The identification number of the first step to execute for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The category of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OwnerLogin</maml:name><maml:description><maml:para>The name of the login that owns the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventLogLevel</maml:name><maml:description><maml:para>Specifies when to place an entry in the Microsoft Windows application log for this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailLevel</maml:name><maml:description><maml:para>Specifies when to send an e-mail upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageLevel</maml:name><maml:description><maml:para>Specifies when to send a page upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailOperator</maml:name><maml:description><maml:para>The e-mail name of the operator to whom the e-mail is sent when EmailLevel is reached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendOperator</maml:name><maml:description><maml:para>The name of the operator to whom the network message is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageOperator</maml:name><maml:description><maml:para>The name of the operator to whom a page is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteLevel</maml:name><maml:description><maml:para>Specifies when to delete the job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The category of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteLevel</maml:name><maml:description><maml:para>Specifies when to delete the job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Sets the status of the job to disabled. By default a job is enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailLevel</maml:name><maml:description><maml:para>Specifies when to send an e-mail upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailOperator</maml:name><maml:description><maml:para>The e-mail name of the operator to whom the e-mail is sent when EmailLevel is reached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventLogLevel</maml:name><maml:description><maml:para>Specifies when to place an entry in the Microsoft Windows application log for this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job. The name must be unique and cannot contain the percent (%) character.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendOperator</maml:name><maml:description><maml:para>The name of the operator to whom the network message is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OwnerLogin</maml:name><maml:description><maml:para>The name of the login that owns the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageLevel</maml:name><maml:description><maml:para>Specifies when to send a page upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageOperator</maml:name><maml:description><maml:para>The name of the operator to whom a page is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Schedule to attach to job. This can be more than one schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleId</maml:name><maml:description><maml:para>Schedule ID to attach to job. This can be more than one schedule ID.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartStepId</maml:name><maml:description><maml:para>The identification number of the first step to execute for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance sql1 -Job 'Job One' -Description 'Just another job' </dev:code><dev:remarks><maml:para> Creates a job with the name "Job1" and a small description </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance sql1 -Job 'Job One' -Disabled </dev:code><dev:remarks><maml:para> Creates the job but sets it to disabled </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance sql1 -Job 'Job One' -EventLogLevel OnSuccess </dev:code><dev:remarks><maml:para> Creates the job and sets the notification to write to the Windows Application event log on success </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance SSTAD-PC -Job 'Job One' -EmailLevel OnFailure -EmailOperator dba </dev:code><dev:remarks><maml:para> Creates the job and sets the notification to send an e-mail to the e-mail operator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance sql1 -Job 'Job One' -Description 'Just another job' -Whatif </dev:code><dev:remarks><maml:para> Doesn't create the job but shows what would happen. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job 'Job One' </dev:code><dev:remarks><maml:para> Creates a job with the name "Job One" on multiple servers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> "sql1", "sql2", "sql3" | New-DbaAgentJob -Job 'Job One' </dev:code><dev:remarks><maml:para> Creates a job with the name "Job One" on multiple servers using the pipe line </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentJobCategory</command:name><command:noun>DbaAgentJobCategory</command:noun><command:verb>New</command:verb><maml:description><maml:para>New-DbaAgentJobCategory creates a new job category.</maml:para></maml:description></command:details><maml:description><maml:para>New-DbaAgentJobCategory makes it possible to create a job category that can be used with jobs.</maml:para><maml:para>It returns an array of the job categories created .</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentJobCategory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". The default is "LocalJob" and will automatically be set when no option is chosen.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". The default is "LocalJob" and will automatically be set when no option is chosen.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobCategory Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobCategory -SqlInstance sql1 -Category 'Category 1' </dev:code><dev:remarks><maml:para> Creates a new job category with the name 'Category 1'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobCategory -SqlInstance sql1 -Category 'Category 2' -CategoryType MultiServerJob </dev:code><dev:remarks><maml:para> Creates a new job category with the name 'Category 2' and assign the category type for a multi server job. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentJobCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentJobStep</command:name><command:noun>DbaAgentJobStep</command:noun><command:verb>New</command:verb><maml:description><maml:para>New-DbaAgentJobStep creates a new job step for a job</maml:para></maml:description></command:details><maml:description><maml:para>New-DbaAgentJobStep creates a new job in the SQL Server Agent for a specific job</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentJobStep</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job to which to add the step.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepId</maml:name><maml:description><maml:para>The sequence identification number for the job step. Step identification numbers start at 1 and increment without gaps.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the step.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subsystem</maml:name><maml:description><maml:para>The subsystem used by the SQL Server Agent service to execute command. Allowed values 'ActiveScripting','AnalysisCommand','AnalysisQuery','CmdExec','Distribution','LogReader','Merge','PowerShell','QueueReader','Snapshot','Ssis','TransactSql' The default is 'TransactSql'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubsystemServer</maml:name><maml:description><maml:para>The subsystems AnalysisScripting, AnalysisCommand, AnalysisQuery ned the server property to be able to apply</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Command</maml:name><maml:description><maml:para>The commands to be executed by SQLServerAgent service through subsystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CmdExecSuccessCode</maml:name><maml:description><maml:para>The value returned by a CmdExec subsystem command to indicate that command executed successfully.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessAction</maml:name><maml:description><maml:para>The action to perform if the step succeeds. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step succeeds and OnSuccessAction is "GoToStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailAction</maml:name><maml:description><maml:para>The action to perform if the step fails. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step fails and OnFailAction is "GoToStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the database in which to execute a Transact-SQL step. The default is 'master'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseUser</maml:name><maml:description><maml:para>The name of the user account to use when executing a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryAttempts</maml:name><maml:description><maml:para>The number of retry attempts to use if this step fails. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryInterval</maml:name><maml:description><maml:para>The amount of time in minutes between retry attempts. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileName</maml:name><maml:description><maml:para>The name of the file in which the output of this step is saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Insert</maml:name><maml:description><maml:para>This switch indicates the new step is inserted at the specified stepid. All following steps will have their IDs incremented by, and success/failure next steps incremented accordingly</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Sets the flag(s) for the job step. Flag Description ---------------------------------------------------------------------------- AppendAllCmdExecOutputToJobHistory Job history, including command output, is appended to the job history file. AppendToJobHistory Job history is appended to the job history file. AppendToLogFile Job history is appended to the SQL Server log file. AppendToTableLog Job history is appended to a log table. LogToTableWithOverwrite Job history is written to a log table, overwriting previous contents. None Job history is not appended to a file. ProvideStopProcessEvent Job processing is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyName</maml:name><maml:description><maml:para>The name of the proxy that the job step runs as.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CmdExecSuccessCode</maml:name><maml:description><maml:para>The value returned by a CmdExec subsystem command to indicate that command executed successfully.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Command</maml:name><maml:description><maml:para>The commands to be executed by SQLServerAgent service through subsystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the database in which to execute a Transact-SQL step. The default is 'master'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseUser</maml:name><maml:description><maml:para>The name of the user account to use when executing a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Sets the flag(s) for the job step. Flag Description ---------------------------------------------------------------------------- AppendAllCmdExecOutputToJobHistory Job history, including command output, is appended to the job history file. AppendToJobHistory Job history is appended to the job history file. AppendToLogFile Job history is appended to the SQL Server log file. AppendToTableLog Job history is appended to a log table. LogToTableWithOverwrite Job history is written to a log table, overwriting previous contents. None Job history is not appended to a file. ProvideStopProcessEvent Job processing is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Insert</maml:name><maml:description><maml:para>This switch indicates the new step is inserted at the specified stepid. All following steps will have their IDs incremented by, and success/failure next steps incremented accordingly</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job to which to add the step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailAction</maml:name><maml:description><maml:para>The action to perform if the step fails. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step fails and OnFailAction is "GoToStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessAction</maml:name><maml:description><maml:para>The action to perform if the step succeeds. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step succeeds and OnSuccessAction is "GoToStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileName</maml:name><maml:description><maml:para>The name of the file in which the output of this step is saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyName</maml:name><maml:description><maml:para>The name of the proxy that the job step runs as.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryAttempts</maml:name><maml:description><maml:para>The number of retry attempts to use if this step fails. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryInterval</maml:name><maml:description><maml:para>The amount of time in minutes between retry attempts. The default is 0.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepId</maml:name><maml:description><maml:para>The sequence identification number for the job step. Step identification numbers start at 1 and increment without gaps.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subsystem</maml:name><maml:description><maml:para>The subsystem used by the SQL Server Agent service to execute command. Allowed values 'ActiveScripting','AnalysisCommand','AnalysisQuery','CmdExec','Distribution','LogReader','Merge','PowerShell','QueueReader','Snapshot','Ssis','TransactSql' The default is 'TransactSql'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubsystemServer</maml:name><maml:description><maml:para>The subsystems AnalysisScripting, AnalysisCommand, AnalysisQuery ned the server property to be able to apply</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 </dev:code><dev:remarks><maml:para> Create a step in "Job1" with the name Step1 with the default subsystem TransactSql. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Create a step in "Job1" with the name Step1 where the database will the msdb </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Create a step in "Job1" with the name Step1 where the database will the "msdb" for multiple servers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1, Job2, 'Job Three' -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Create a step in "Job1" with the name Step1 where the database will the "msdb" for multiple servers for multiple jobs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | New-DbaAgentJobStep -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Create a step in "Job1" with the name Step1 where the database will the "msdb" for multiple servers using pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobStep -SqlInstance sq1 -Job Job1 -StepName StepA -Database msdb -StepId 2 -Insert </dev:code><dev:remarks><maml:para> Assuming Job1 already has steps Step1 and Step2, will create a new step Step A and set the step order as Step1, StepA, Step2 Internal StepIds will be updated, and any specific OnSuccess/OnFailure step references will also be updated </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentJobStep</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentOperator</command:name><command:noun>DbaAgentOperator</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new operator on an instance.</maml:para></maml:description></command:details><maml:description><maml:para>If the operator already exists on the destination, it will not be created unless -Force is used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentOperator</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>The email address the SQL Agent will use to email alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendAddress</maml:name><maml:description><maml:para>The net send address the SQL Agent will use for the operator to net send alerts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerAddress</maml:name><maml:description><maml:para>The pager email address the SQL Agent will use to send alerts to the oeprator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerDay</maml:name><maml:description><maml:para>Defines what days the pager portion of the operator will be used. The default is 'Everyday'. Valid parameters are 'EveryDay', 'Weekdays', 'Weekend', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', and 'Saturday'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayStartTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayEndTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailsafeOperator</maml:name><maml:description><maml:para>If this switch is enabled, this operator will be your failsafe operator and replace the one that existed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailsafeNotificationMethod</maml:name><maml:description><maml:para>Defines the notification method for the failsafe oeprator. Value must be NotifyMail or NotifyPager. The default is NotifyEmail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>SMO Server Objects (pipeline input from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>The email address the SQL Agent will use to email alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailsafeNotificationMethod</maml:name><maml:description><maml:para>Defines the notification method for the failsafe oeprator. Value must be NotifyMail or NotifyPager. The default is NotifyEmail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Operator will be dropped and recreated on instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>SMO Server Objects (pipeline input from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailsafeOperator</maml:name><maml:description><maml:para>If this switch is enabled, this operator will be your failsafe operator and replace the one that existed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendAddress</maml:name><maml:description><maml:para>The net send address the SQL Agent will use for the operator to net send alerts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerAddress</maml:name><maml:description><maml:para>The pager email address the SQL Agent will use to send alerts to the oeprator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerDay</maml:name><maml:description><maml:para>Defines what days the pager portion of the operator will be used. The default is 'Everyday'. Valid parameters are 'EveryDay', 'Weekdays', 'Weekend', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', and 'Saturday'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayEndTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayStartTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Operator Author: Tracy Boggiano (@TracyBoggiano), databasesuperhero.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS:\> </maml:para></maml:introduction><dev:code> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress operator@operator.com -PagerDay Everyday -Force </dev:code><dev:remarks><maml:para> This sets a new operator named DBA with the above email address with default values to alerts everyday for all hours of the day. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS:\> </maml:para></maml:introduction><dev:code> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress operator@operator.com -NetSendAddress dbauser1 -PagerAddress dbauser1@pager.dbatools.io -PagerDay Everyday -SaturdayStartTime 070000 -SaturdayEndTime 180000 -SundayStartTime 080000 -SundayEndTime 170000 -WeekdayStartTime 060000 -WeekdayEndTime 190000 </dev:code><dev:remarks><maml:para> Creates a new operator named DBA on the sql01 instance with email address operator@operator.com, net send address of dbauser1, pager address of dbauser1@pager.dbatools.io, page day as every day, Saturday start time of 7am, Saturday end time of 6pm, Sunday start time of 8am, Sunday end time of 5pm, Weekday start time of 6am, and Weekday end time of 7pm. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentOperator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentProxy</command:name><command:noun>DbaAgentProxy</command:noun><command:verb>New</command:verb><maml:description><maml:para>Adds one or more proxies to SQL Server Agent</maml:para></maml:description></command:details><maml:description><maml:para>Adds one or more proxies to SQL Server Agent</maml:para><maml:para>Note: ActiveScripting (ActiveX scripting) was discontinued in SQL Server 2016: https://docs.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentProxy</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the proxy or proxies you want to create</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyCredential</maml:name><maml:description><maml:para>The associated SQL Server Credential. The credential must be created prior to creating the Proxy.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubSystem</maml:name><maml:description><maml:para>The associated subsystem or subsystems. Defaults to CmdExec. Valid options include: ActiveScripting AnalysisCommand AnalysisQuery CmdExec Distribution LogReader Merge PowerShell QueueReader Snapshot Ssis</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>A description of the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The SQL Server login or logins (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The SQL Server role or roles (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MsdbRole</maml:name><maml:description><maml:para>The msdb role or roles (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the proxy as disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the proxy if it already exists</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>A description of the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the proxy as disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the proxy if it already exists</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The SQL Server login or logins (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MsdbRole</maml:name><maml:description><maml:para>The msdb role or roles (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the proxy or proxies you want to create</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyCredential</maml:name><maml:description><maml:para>The associated SQL Server Credential. The credential must be created prior to creating the Proxy.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The SQL Server role or roles (known as proxy principals) to assign to the proxy</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubSystem</maml:name><maml:description><maml:para>The associated subsystem or subsystems. Defaults to CmdExec. Valid options include: ActiveScripting AnalysisCommand AnalysisQuery CmdExec Distribution LogReader Merge PowerShell QueueReader Snapshot Ssis</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Proxy Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentProxy -SqlInstance sql2016 -Name STIG -ProxyCredential 'PowerShell Proxy' </dev:code><dev:remarks><maml:para> Creates an Agent Proxy on sql2016 with the name STIG with the 'PowerShell Proxy' credential. The proxy is automatically added to the CmdExec subsystem. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentProxy -SqlInstance localhost\sql2016 -Name STIG -ProxyCredential 'PowerShell Proxy' -Description "Used for auditing purposes" -Login ad\sqlstig -SubSystem CmdExec, PowerShell -ServerRole securityadmin -MsdbRole ServerGroupAdministratorRole </dev:code><dev:remarks><maml:para> Creates an Agent Proxy on sql2016 with the name STIG with the 'PowerShell Proxy' credential and the following principals: Login: ad\sqlstig ServerRole: securityadmin MsdbRole: ServerGroupAdministratorRole By default, only sysadmins have access to create job steps with proxies. This will allow 3 additional principals access: The proxy is then added to the CmdExec and PowerShell subsystems </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentProxy</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>New</command:verb><maml:description><maml:para>New-DbaAgentSchedule creates a new schedule in the msdb database.</maml:para></maml:description></command:details><maml:description><maml:para>New-DbaAgentSchedule will help create a new schedule for a job.</maml:para><maml:para>If the job parameter is not supplied the schedule will not be attached to a job.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAgentSchedule</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job that has the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>The name of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Set the schedule to disabled. Default is enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values: 'Once', 'OneTime', 'Daily', 'Weekly', 'Monthly', 'MonthlyRelative', 'AgentStart', 'AutoStart', 'IdleComputer', 'OnIdle' The following synonyms provide flexibility to the allowed values for this function parameter: Once=OneTime AgentStart=AutoStart IdleComputer=OnIdle If force is used the default will be "Once".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyInterval</maml:name><maml:description><maml:para>The days that a job is executed Allowed values for FrequencyType 'Daily': EveryDay or a number between 1 and 365. Allowed values for FrequencyType 'Weekly': Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay. Allowed values for FrequencyType 'Monthly': Numbers 1 to 31 for each day of the month. If "Weekdays", "Weekend" or "EveryDay" is used it over writes any other value that has been passed before. If force is used the default will be 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values: 'Once', 'Time', 'Seconds', 'Second', 'Minutes', 'Minute', 'Hours', 'Hour' The following synonyms provide flexibility to the allowed values for this function parameter: Once=Time Seconds=Second Minutes=Minute Hours=Hour</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of a job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative). Allowed values: First, Second, Third, Fourth or Last</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is "Weekly", "Monthly" or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin. If force is used the start date will be the current day</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop. If force is used the end date will be '9999-12-31'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM. If force is used the start time will be '00:00:00'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM. If force is used the start time will be '23:59:59'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Set the schedule to disabled. Default is enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop. If force is used the end date will be '9999-12-31'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM. If force is used the start time will be '23:59:59'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyInterval</maml:name><maml:description><maml:para>The days that a job is executed Allowed values for FrequencyType 'Daily': EveryDay or a number between 1 and 365. Allowed values for FrequencyType 'Weekly': Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay. Allowed values for FrequencyType 'Monthly': Numbers 1 to 31 for each day of the month. If "Weekdays", "Weekend" or "EveryDay" is used it over writes any other value that has been passed before. If force is used the default will be 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is "Weekly", "Monthly" or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyInterval is 32 (monthlyrelative). Allowed values: First, Second, Third, Fourth or Last</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of a job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values: 'Once', 'Time', 'Seconds', 'Second', 'Minutes', 'Minute', 'Hours', 'Hour' The following synonyms provide flexibility to the allowed values for this function parameter: Once=Time Seconds=Second Minutes=Minute Hours=Hour</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values: 'Once', 'OneTime', 'Daily', 'Weekly', 'Monthly', 'MonthlyRelative', 'AgentStart', 'AutoStart', 'IdleComputer', 'OnIdle' The following synonyms provide flexibility to the allowed values for this function parameter: Once=OneTime AgentStart=AutoStart IdleComputer=OnIdle If force is used the default will be "Once".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job that has the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>The name of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin. If force is used the start date will be the current day</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM. If force is used the start time will be '00:00:00'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentSchedule -SqlInstance sql01 -Schedule DailyAt6 -FrequencyType Daily -StartTime "060000" -Force </dev:code><dev:remarks><maml:para> Creates a schedule that runs jobs every day at 6 in the morning. It assumes default values for the start date, start time, end date and end time due to -Force. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentSchedule -SqlInstance localhost\SQL2016 -Schedule daily -FrequencyType Daily -FrequencyInterval Everyday -Force </dev:code><dev:remarks><maml:para> Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentSchedule -SqlInstance sstad-pc -Schedule MonthlyTest -FrequencyType Monthly -FrequencyInterval 10 -FrequencyRecurrenceFactor 1 -Force </dev:code><dev:remarks><maml:para> Create 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAgentSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>New</command:verb><maml:description><maml:para>Automates the creation of availability groups.</maml:para></maml:description></command:details><maml:description><maml:para>Automates the creation of availability groups.</maml:para><maml:para>* Checks prerequisites</maml:para><maml:para>* Creates Availability Group and adds primary replica</maml:para><maml:para>* Grants cluster permissions if necessary</maml:para><maml:para>* Adds secondary replica if supplied</maml:para><maml:para>* Adds databases if supplied</maml:para><maml:para> * Performs backup/restore if seeding mode is manual</maml:para><maml:para> * Database has to be in full recovery mode (so at least one backup has been taken) if seeding mode is automatic</maml:para><maml:para>* Adds listener to primary if supplied</maml:para><maml:para>* Joins secondaries to availability group</maml:para><maml:para>* Grants endpoint connect permissions to service accounts</maml:para><maml:para>* Grants CreateAnyDatabase permissions if seeding mode is automatic</maml:para><maml:para>* Returns Availability Group object from primary</maml:para><maml:para>NOTES:</maml:para><maml:para>- If a backup / restore is performed, the backups will be left intact on the network share.</maml:para><maml:para>- If you're using SQL Server on Linux and a fully qualified domain name is required, please use the FQDN to create a proper Endpoint</maml:para><maml:para>PLEASE NOTE THE CHANGED DEFAULTS:</maml:para><maml:para>Starting with version 1.1.x we changed the defaults of the following parameters to have the same defaults</maml:para><maml:para>as the T-SQL command "CREATE AVAILABILITY GROUP" and the wizard in SQL Server Management Studio:</maml:para><maml:para>* ClusterType from External to Wsfc (Windows Server Failover Cluster).</maml:para><maml:para>* FailureConditionLevel from OnServerDown (Level 1) to OnCriticalServerErrors (Level 3).</maml:para><maml:para>* ConnectionModeInSecondaryRole from AllowAllConnections (ALL) to AllowNoConnections (NO).</maml:para><maml:para>To change these defaults we have introduced configuration parameters for all of them, see documentation of the parameters for details.</maml:para><maml:para>Thanks for this, Thomas Stringer! https://blogs.technet.microsoft.com/heyscriptingguy/2013/04/29/set-up-an-alwayson-availability-group-with-powershell/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAvailabilityGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>The primary SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the Availability Group.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DtcSupport</maml:name><maml:description><maml:para>Indicates whether the DtcSupport is enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: Wsfc, External or None. Defaults to Wsfc (Windows Server Failover Cluster). The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ClusterType' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>Specifies how replicas in the primary role are treated in the evaluation to pick the desired replica to perform a backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Specifies the different conditions that can trigger an automatic failover in Availability Group. Defaults to OnCriticalServerErrors (Level 3). From https://docs.microsoft.com/en-us/sql/t-sql/statements/create-availability-group-transact-sql: Level 1 = OnServerDown Level 2 = OnServerUnresponsive Level 3 = OnCriticalServerErrors (the default in CREATE AVAILABILITY GROUP and in this command) Level 4 = OnModerateServerErrors Level 5 = OnAnyQualifiedFailureCondition The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.FailureConditionLevel' -Value 'On...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>This setting used to specify the length of time, in milliseconds, that the SQL Server resource DLL should wait for information returned by the sp_server_diagnostics stored procedure before reporting the Always On Failover Cluster Instance (FCI) as unresponsive. Changes that are made to the timeout settings are effective immediately and do not require a restart of the SQL Server resource. Defaults to 30000 (30 seconds).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Basic</maml:name><maml:description><maml:para>Indicates whether the availability group is Basic Availability Group. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseHealthTrigger</maml:name><maml:description><maml:para>Indicates whether the availability group triggers the database health.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the availability group, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to add.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full and log backup of database. A log backup must be the last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the database on remote servers using fresh backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic, Manual and External. Automatic is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Specifies the connection intent modes of an Availability Replica in primary role. AllowAllConnections by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Specifies the connection modes of an Availability Replica in secondary role. Options include: AllowNoConnections (Alias: No), AllowReadIntentConnectionsOnly (Alias: Read-intent only), AllowAllConnections (Alias: Yes) Defaults to AllowNoConnections. The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ConnectionModeInSecondaryRole' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>By default, this command will attempt to find a DatabaseMirror endpoint. If one does not exist, it will create it. If an endpoint must be created, the name "hadr_endpoint" will be used. If an alternative is preferred, use Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>By default, the property Fqdn of Get-DbaEndpoint is used as EndpointUrl. Use EndpointUrl if different URLs are required due to special network configurations. EndpointUrl has to be an array of strings in format 'TCP://system-address:port', one entry for every instance. First entry for the primary instance, following entries for secondary instances in the order they show up in Secondary. See details regarding the format at: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/specify-endpoint-url-adding-or-modifying-availability-replica</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Specifies that the endpoint is to authenticate the connection using the certificate specified by certificate_name to establish identity for authorization. The far endpoint must have a certificate with the public key matching the private key of the specified certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigureXESession</maml:name><maml:description><maml:para>Configure the AlwaysOn_health extended events session to start automatically on every replica as the SSMS wizard would do. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-extended-events#BKMK_alwayson_health</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Sets the IP address of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="22" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetMask</maml:name><maml:description><maml:para>Sets the subnet IP mask of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Ipaddress</command:parameterValue><dev:type><maml:name>Ipaddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="23" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the number of the port used to communicate with the availability group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dhcp</maml:name><maml:description><maml:para>Indicates whether the object is DHCP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>Specifies how replicas in the primary role are treated in the evaluation to pick the desired replica to perform a backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Basic</maml:name><maml:description><maml:para>Indicates whether the availability group is Basic Availability Group. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Specifies that the endpoint is to authenticate the connection using the certificate specified by certificate_name to establish identity for authorization. The far endpoint must have a certificate with the public key matching the private key of the specified certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: Wsfc, External or None. Defaults to Wsfc (Windows Server Failover Cluster). The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ClusterType' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigureXESession</maml:name><maml:description><maml:para>Configure the AlwaysOn_health extended events session to start automatically on every replica as the SSMS wizard would do. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-extended-events#BKMK_alwayson_health</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Specifies the connection intent modes of an Availability Replica in primary role. AllowAllConnections by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Specifies the connection modes of an Availability Replica in secondary role. Options include: AllowNoConnections (Alias: No), AllowReadIntentConnectionsOnly (Alias: Read-intent only), AllowAllConnections (Alias: Yes) Defaults to AllowNoConnections. The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.ConnectionModeInSecondaryRole' -Value '...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to add.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseHealthTrigger</maml:name><maml:description><maml:para>Indicates whether the availability group triggers the database health.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dhcp</maml:name><maml:description><maml:para>Indicates whether the object is DHCP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DtcSupport</maml:name><maml:description><maml:para>Indicates whether the DtcSupport is enabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>By default, this command will attempt to find a DatabaseMirror endpoint. If one does not exist, it will create it. If an endpoint must be created, the name "hadr_endpoint" will be used. If an alternative is preferred, use Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>By default, the property Fqdn of Get-DbaEndpoint is used as EndpointUrl. Use EndpointUrl if different URLs are required due to special network configurations. EndpointUrl has to be an array of strings in format 'TCP://system-address:port', one entry for every instance. First entry for the primary instance, following entries for secondary instances in the order they show up in Secondary. See details regarding the format at: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/specify-endpoint-url-adding-or-modifying-availability-replica</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic, Manual and External. Automatic is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Specifies the different conditions that can trigger an automatic failover in Availability Group. Defaults to OnCriticalServerErrors (Level 3). From https://docs.microsoft.com/en-us/sql/t-sql/statements/create-availability-group-transact-sql: Level 1 = OnServerDown Level 2 = OnServerUnresponsive Level 3 = OnCriticalServerErrors (the default in CREATE AVAILABILITY GROUP and in this command) Level 4 = OnModerateServerErrors Level 5 = OnAnyQualifiedFailureCondition The default can be changed with: Set-DbatoolsConfig -FullName 'AvailabilityGroups.Default.FailureConditionLevel' -Value 'On...' -Passthru | Register-DbatoolsConfig</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drop and recreate the database on remote servers using fresh backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>This setting used to specify the length of time, in milliseconds, that the SQL Server resource DLL should wait for information returned by the sp_server_diagnostics stored procedure before reporting the Always On Failover Cluster Instance (FCI) as unresponsive. Changes that are made to the timeout settings are effective immediately and do not require a restart of the SQL Server resource. Defaults to 30000 (30 seconds).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Sets the IP address of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the availability group, just pass thru an object that can be further customized before creation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the number of the port used to communicate with the availability group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>The primary SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>The network share where the backups will be backed up and restored from. Each SQL Server service account must have access to this share. NOTE: If a backup / restore is performed, the backups will be left in tact on the network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubnetMask</maml:name><maml:description><maml:para>Sets the subnet IP mask of the availability group listener.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Ipaddress</command:parameterValue><dev:type><maml:name>Ipaddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full and log backup of database. A log backup must be the last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2016a -Name SharePoint </dev:code><dev:remarks><maml:para> Creates a new availability group on sql2016a named SharePoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2016a -Name SharePoint -Secondary sql2016b </dev:code><dev:remarks><maml:para> Creates a new availability group on sql2016a named SharePoint with a secondary replica, sql2016b </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2016std -Name BAG1 -Basic -Confirm:$false </dev:code><dev:remarks><maml:para> Creates a basic availability group named BAG1 on sql2016std and does not confirm when setting up </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2016b -Name AG1 -Dhcp -Database db1 -UseLastBackup </dev:code><dev:remarks><maml:para> Creates an availability group on sql2016b with the name ag1. Uses the last backups available to add the database db1 to the AG. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2017 -Name SharePoint -ClusterType None -FailoverMode Manual </dev:code><dev:remarks><maml:para> Creates a new availability group on sql2017 named SharePoint with a cluster type of none and a failover mode of manual </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql1 -Secondary sql2 -Name ag1 -Database pubs -ClusterType None -SeedingMode Automatic -FailoverMode Manual </dev:code><dev:remarks><maml:para> Creates a new availability group with a primary replica on sql1 and a secondary on sql2. Automatically adds the database pubs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql1 -Secondary sql2 -Name ag1 -Database pubs -EndpointUrl 'TCP://sql1.specialnet.local:5022', 'TCP://sql2.specialnet.local:5022' </dev:code><dev:remarks><maml:para> Creates a new availability group with a primary replica on sql1 and a secondary on sql2 with custom endpoint urls. Automatically adds the database pubs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> $params = @{ >> Primary = "sql1" >> PrimarySqlCredential = $cred >> Secondary = "sql2" >> SecondarySqlCredential = $cred >> Name = "test-ag" >> Database = "pubs" >> ClusterType = "None" >> SeedingMode = "Automatic" >> FailoverMode = "Manual" >> Confirm = $false >> } PS C:\> New-DbaAvailabilityGroup @params This exact command was used to create an availability group on docker! </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaAzAccessToken</command:name><command:noun>DbaAzAccessToken</command:noun><command:verb>New</command:verb><maml:description><maml:para>Simplifies the generation of Azure oauth2 tokens.</maml:para></maml:description></command:details><maml:description><maml:para>Generates an oauth2 access token. Currently supports Managed Identities, Service Principals and IRenewableToken.</maml:para><maml:para>Want to know more about Access Tokens? This page explains it well: https://dzone.com/articles/using-managed-identity-to-securely-access-azure-re</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaAzAccessToken</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of request: ManagedIdentity ServicePrincipal RenewableServicePrincipal</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subtype</maml:name><maml:description><maml:para>The subtype. Options include: AzureSqlDb (default) ResourceManager DataLake EventHubs KeyVault ResourceManager ServiceBus Storage Read more here: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The hashtable or json configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>When using the ServicePrincipal type, a Credential is required. The username is the App ID and Password is the App Password https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tenant</maml:name><maml:description><maml:para>When using the ServicePrincipal or RenewableServicePrincipal types, a tenant name or ID is required. This field works with both.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Thumbprint for connections to Azure MSI</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Store where the Azure MSI certificate is stored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The hashtable or json configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>When using the ServicePrincipal type, a Credential is required. The username is the App ID and Password is the App Password https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Store where the Azure MSI certificate is stored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subtype</maml:name><maml:description><maml:para>The subtype. Options include: AzureSqlDb (default) ResourceManager DataLake EventHubs KeyVault ResourceManager ServiceBus Storage Read more here: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Tenant</maml:name><maml:description><maml:para>When using the ServicePrincipal or RenewableServicePrincipal types, a tenant name or ID is required. This field works with both.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Thumbprint for connections to Azure MSI</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of request: ManagedIdentity ServicePrincipal RenewableServicePrincipal</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connect, Connection, Azure Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAzAccessToken -Type ManagedIdentity </dev:code><dev:remarks><maml:para> Returns a plain-text token for Managed Identities for SQL Azure Db. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $token = New-DbaAzAccessToken -Type ManagedIdentity -Subtype AzureSqlDb </dev:code><dev:remarks><maml:para> PS C:\> $server = Connect-DbaInstance -SqlInstance myserver.database.windows.net -Database mydb -AccessToken $token -DisableException Generates a token then uses it to connect to Azure SQL DB then connects to an Azure SQL Db </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $token = New-DbaAzAccessToken -Type ServicePrincipal -Tenant whatup.onmicrosoft.com -Credential ee590f55-9b2b-55d4-8bca-38ab123db670 </dev:code><dev:remarks><maml:para> PS C:\> $server = Connect-DbaInstance -SqlInstance myserver.database.windows.net -Database mydb -AccessToken $token -DisableException PS C:\> Invoke-DbaQuery -SqlInstance $server -Query "select 1 as test" Generates a token then uses it to connect to Azure SQL DB then connects to an Azure SQL Db. Once the connection is made, it is used to perform a test query. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaAzAccessToken</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaClientAlias</command:name><command:noun>DbaClientAlias</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates/updates a sql alias for the specified server - mimics cliconfg.exe</maml:para></maml:description></command:details><maml:description><maml:para>Creates/updates a SQL Server alias by altering HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaClientAlias</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>The target SQL Server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>The alias to be created</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Protocol</maml:name><maml:description><maml:para>The protocol for the connection, either TCPIP or NetBIOS. Defaults to TCPIP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>The alias to be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Protocol</maml:name><maml:description><maml:para>The protocol for the connection, either TCPIP or NetBIOS. Defaults to TCPIP.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>The target SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlClient, Alias Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaClientAlias -ServerName sqlcluster\sharepoint -Alias sp </dev:code><dev:remarks><maml:para> Creates a new TCP alias on the local workstation called sp, which points sqlcluster\sharepoint </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaClientAlias -ServerName 'sqlcluster,14443' -Alias spinstance </dev:code><dev:remarks><maml:para> Creates a new TCP alias on the local workstation called spinstance, which points to sqlcluster, port 14443. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaClientAlias -ServerName sqlcluster\sharepoint -Alias sp -Protocol NamedPipes </dev:code><dev:remarks><maml:para> Creates a new NamedPipes alias on the local workstation called sp, which points sqlcluster\sharepoint </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaClientAlias</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaCmConnection</command:name><command:noun>DbaCmConnection</command:noun><command:verb>New</command:verb><maml:description><maml:para>Generates a connection object for use in remote computer management.</maml:para></maml:description></command:details><maml:description><maml:para>Generates a connection object for use in remote computer management.</maml:para><maml:para>Those objects are used for the purpose of cim/wmi queries, caching which protocol worked, optimizing performance and minimizing authentication errors.</maml:para><maml:para>New-DbaCmConnection will create a NEW object and overwrite any existing ones for the specified computer.</maml:para><maml:para>Furthermore, information stored in the input beyond the computername will be discarded in favor of the new settings.</maml:para><maml:para>Unless the connection cache has been disabled, all connections will automatically be registered in the cache, so no further action is necessary.</maml:para><maml:para>The output is primarily for information purposes, however it may be used to pass objects and circumvent the cache with those.</maml:para><maml:para>NOTE: 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.</maml:para><maml:para>This function exists to be able to preconfigure connections.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaCmConnection</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential to register.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WindowsCredentialsAreBad</maml:name><maml:description><maml:para>Will prevent the windows credentials of the currently logged on user from being used for the remote connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaCmConnection</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseWindowsCredentials</maml:name><maml:description><maml:para>Whether using the default windows credentials is legit. Not setting this will not exclude using windows credentials, but only not pre-confirm them as working.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential to register.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseWindowsCredentials</maml:name><maml:description><maml:para>Whether using the default windows credentials is legit. Not setting this will not exclude using windows credentials, but only not pre-confirm them as working.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WindowsCredentialsAreBad</maml:name><maml:description><maml:para>Will prevent the windows credentials of the currently logged on user from being used for the remote connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCmConnection -ComputerName sql2014 -UseWindowsCredentials -OverrideExplicitCredential -DisabledConnectionTypes CimRM </dev:code><dev:remarks><maml:para> Returns a new configuration object for connecting to the computer sql2014. - The current user credentials are set as valid - The connection is configured to ignore explicit credentials (so all connections use the windows credentials) - The connections will not try using CIM over WinRM Unless caching is globally disabled, this is automatically stored in the connection cache and will be applied automatically. In that (the default) case, the output is for information purposes only and need not be used. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Content computers.txt | New-DbaCmConnection -Credential $cred -CimWinRMOptions $options -DisableBadCredentialCache -OverrideExplicitCredential </dev:code><dev:remarks><maml:para> Gathers a list of computers from a text file, then creates and registers connections for each of them, setting them to ... - use the credentials stored in $cred - use the options stored in $options when connecting using CIM over WinRM - not store credentials that are known to not work - to ignore explicitly specified credentials Essentially, this configures all connections to those computers to prefer failure with the specified credentials over using alternative credentials. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaCmConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaComputerCertificate</command:name><command:noun>DbaComputerCertificate</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new computer certificate useful for Forcing Encryption</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new computer certificate - self-signed or signed by an Active Directory CA, using the Web Server certificate.</maml:para><maml:para>By default, a key with a length of 1024 and a friendly name of the machines FQDN is generated.</maml:para><maml:para>This command was originally intended to help automate the process so that SSL certificates can be available for enforcing encryption on connections.</maml:para><maml:para>It 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 ;)</maml:para><maml:para>References:</maml:para><maml:para>https://www.itprotoday.com/sql-server/7-steps-ssl-encryption</maml:para><maml:para>https://azurebi.jppp.org/2016/01/23/using-lets-encrypt-certificates-for-secure-sql-server-connections/</maml:para><maml:para>https://blogs.msdn.microsoft.com/sqlserverfaq/2016/09/26/creating-and-registering-ssl-certificates/</maml:para><maml:para>The certificate is generated using AD's webserver SSL template on the client machine and pushed to the remote machine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaComputerCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify ClusterInstanceName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaServer</maml:name><maml:description><maml:para>Optional - the CA Server where the request will be sent to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaName</maml:name><maml:description><maml:para>The properly formatted CA name of the corresponding CaServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterInstanceName</maml:name><maml:description><maml:para>When creating certs for a cluster, use this parameter to create the certificate for the cluster node name. Use ComputerName for each of the nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Password to encrypt/decrypt private key for export to remote machine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FriendlyName</maml:name><maml:description><maml:para>The FriendlyName listed in the certificate. This defaults to the FQDN of the $ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateTemplate</maml:name><maml:description><maml:para>The domain's Certificate Template - WebServer by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyLength</maml:name><maml:description><maml:para>The length of the key - defaults to 1024</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Defines where and how to import the private key of an X.509 certificate. Defaults to: Exportable, PersistKeySet EphemeralKeySet The key associated with a PFX file is created in memory and not persisted on disk when importing a certificate. Exportable Imported keys are marked as exportable. NonExportable Expliictly mark keys as nonexportable. PersistKeySet The key associated with a PFX file is persisted when importing a certificate. UserProtected Notify the user through a dialog box or other method that the key is accessed. The Cryptographic Service Provider (CSP) in use defines the precise behavior. NOTE: This can only be used when you add a certificate to localhost, as it causes a prompt to appear.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dns</maml:name><maml:description><maml:para>Specify the Dns entries listed in SAN. By default, it will be ComputerName + FQDN, or in the case of clusters, clustername + cluster FQDN.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelfSigned</maml:name><maml:description><maml:para>Creates a self-signed certificate. All other parameters can still apply except CaServer and CaName because the command does not go and get the certificate signed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaName</maml:name><maml:description><maml:para>The properly formatted CA name of the corresponding CaServer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaServer</maml:name><maml:description><maml:para>Optional - the CA Server where the request will be sent to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateTemplate</maml:name><maml:description><maml:para>The domain's Certificate Template - WebServer by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterInstanceName</maml:name><maml:description><maml:para>When creating certs for a cluster, use this parameter to create the certificate for the cluster node name. Use ComputerName for each of the nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify ClusterInstanceName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dns</maml:name><maml:description><maml:para>Specify the Dns entries listed in SAN. By default, it will be ComputerName + FQDN, or in the case of clusters, clustername + cluster FQDN.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Defines where and how to import the private key of an X.509 certificate. Defaults to: Exportable, PersistKeySet EphemeralKeySet The key associated with a PFX file is created in memory and not persisted on disk when importing a certificate. Exportable Imported keys are marked as exportable. NonExportable Expliictly mark keys as nonexportable. PersistKeySet The key associated with a PFX file is persisted when importing a certificate. UserProtected Notify the user through a dialog box or other method that the key is accessed. The Cryptographic Service Provider (CSP) in use defines the precise behavior. NOTE: This can only be used when you add a certificate to localhost, as it causes a prompt to appear.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FriendlyName</maml:name><maml:description><maml:para>The FriendlyName listed in the certificate. This defaults to the FQDN of the $ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyLength</maml:name><maml:description><maml:para>The length of the key - defaults to 1024</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Password to encrypt/decrypt private key for export to remote machine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelfSigned</maml:name><maml:description><maml:para>Creates a self-signed certificate. All other parameters can still apply except CaServer and CaName because the command does not go and get the certificate signed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate </dev:code><dev:remarks><maml:para> Creates a computer certificate signed by the local domain CA for the local machine with the keylength of 1024. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate -ComputerName Server1 </dev:code><dev:remarks><maml:para> Creates a computer certificate signed by the local domain CA _on the local machine_ for server1 with the keylength of 1024. The certificate is then copied to the new machine over WinRM and imported. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate -ComputerName sqla, sqlb -ClusterInstanceName sqlcluster -KeyLength 4096 </dev:code><dev:remarks><maml:para> Creates a computer certificate for sqlcluster, signed by the local domain CA, with the keylength of 4096. The certificate is then copied to sqla _and_ sqlb over WinRM and imported. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate -ComputerName Server1 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were run </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate -SelfSigned </dev:code><dev:remarks><maml:para> Creates a self-signed certificate </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Add-DbaComputerCertificate -ComputerName sql01 -Path C:\temp\sql01.pfx -Confirm:$false -Flag NonExportable </dev:code><dev:remarks><maml:para> Adds the local C:\temp\sql01.pfx to sql01's LocalMachine\My (Personal) certificate store and marks the private key as non-exportable. Skips confirmation prompt. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaComputerCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaComputerCertificateSigningRequest</command:name><command:noun>DbaComputerCertificateSigningRequest</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new computer certificate signing request. Useful for offline servers and Forcing Encryption.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new computer certificate signing request that is compatible with SQL Server.</maml:para><maml:para>By default, a key with a length of 1024 and a friendly name of the machines FQDN is generated.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaComputerCertificateSigningRequest</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify ClusterInstanceName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterInstanceName</maml:name><maml:description><maml:para>When creating certs for a cluster, use this parameter to create the certificate for the cluster node name. Use ComputerName for each of the nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The folder to export to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FriendlyName</maml:name><maml:description><maml:para>The FriendlyName listed in the certificate. This defaults to the FQDN of the $ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyLength</maml:name><maml:description><maml:para>The length of the key - defaults to 1024</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dns</maml:name><maml:description><maml:para>Specify the Dns entries listed in SAN. By default, it will be ComputerName + FQDN, or in the case of clusters, clustername + cluster FQDN.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterInstanceName</maml:name><maml:description><maml:para>When creating certs for a cluster, use this parameter to create the certificate for the cluster node name. Use ComputerName for each of the nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify ClusterInstanceName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dns</maml:name><maml:description><maml:para>Specify the Dns entries listed in SAN. By default, it will be ComputerName + FQDN, or in the case of clusters, clustername + cluster FQDN.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FriendlyName</maml:name><maml:description><maml:para>The FriendlyName listed in the certificate. This defaults to the FQDN of the $ComputerName</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyLength</maml:name><maml:description><maml:para>The length of the key - defaults to 1024</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The folder to export to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificateSigningRequest </dev:code><dev:remarks><maml:para> Creates a computer certificate signing request for the local machine with the keylength of 1024. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificateSigningRequest -ComputerName Server1 </dev:code><dev:remarks><maml:para> Creates a computer certificate signing request for server1 with the keylength of 1024. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificateSigningRequest -ComputerName sqla, sqlb -ClusterInstanceName sqlcluster -KeyLength 4096 </dev:code><dev:remarks><maml:para> Creates a computer certificate signing request for sqlcluster with the keylength of 4096. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificateSigningRequest -ComputerName Server1 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were run </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaComputerCertificateSigningRequest</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaConnectionString</command:name><command:noun>DbaConnectionString</command:noun><command:verb>New</command:verb><maml:description><maml:para>Builds or extracts a SQL Server Connection String</maml:para></maml:description></command:details><maml:description><maml:para>Builds or extracts a SQL Server Connection String. Note that dbatools-style syntax is used.</maml:para><maml:para>So you do not need to specify "Data Source", you can just specify -SqlInstance and -SqlCredential and we'll handle it for you.</maml:para><maml:para>This is the simplified PowerShell approach to connection string building. See examples for more info.</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx</maml:para><maml:para>and https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx</maml:para><maml:para>and https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaConnectionString</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccessToken</maml:name><maml:description><maml:para>Basically tells the connection string to ignore authentication. Does not include the AccessToken in the resulting connecstring.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationIntent</maml:name><maml:description><maml:para>Declares the application workload type when connecting to a server. Possible values are ReadOnly and ReadWrite.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>By default, this is "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClientName</maml:name><maml:description><maml:para>By default, this command sets the client's ApplicationName property to "dbatools PowerShell module - dbatools.io". If you're doing anything that requires profiling, you can look for this client name. Using -ClientName allows you to set your own custom client application name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectTimeout</maml:name><maml:description><maml:para>The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. Valid values are greater than or equal to 0 and less than or equal to 2147483647. When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptConnection</maml:name><maml:description><maml:para>When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values are true, false, yes, and no. For more information, see Connection String Syntax. Beginning in .NET Framework 4.5, when TrustServerCertificate is false and Encrypt is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see Accepted wildcards used by server certificates for server authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverPartner</maml:name><maml:description><maml:para>The name of the failover partner server where database mirroring is configured. If the value of this key is "", then Initial Catalog must be present, and its value must not be "". The server name can be 128 characters or less. If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail. If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsActiveDirectoryUniversalAuth</maml:name><maml:description><maml:para>Azure related</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockTimeout</maml:name><maml:description><maml:para>Sets the time in seconds required for the connection to time out when the current transaction is locked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPoolSize</maml:name><maml:description><maml:para>Sets the maximum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinPoolSize</maml:name><maml:description><maml:para>Sets the minimum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>When used, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiSubnetFailover</maml:name><maml:description><maml:para>If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetworkProtocol</maml:name><maml:description><maml:para>Connect explicitly using 'TcpIp','NamedPipes','Multiprotocol','AppleTalk','BanyanVines','Via','SharedMemory' and 'NWLinkIpxSpx'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>Request a non-pooled connection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PacketSize</maml:name><maml:description><maml:para>Sets the size in bytes of the network packets used to communicate with an instance of SQL Server. Must match at server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PooledConnectionLifetime</maml:name><maml:description><maml:para>When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) causes pooled connections to have the maximum connection timeout.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlExecutionModes</maml:name><maml:description><maml:para>The SqlExecutionModes enumeration contains values that are used to specify whether the commands sent to the referenced connection to the server are executed immediately or saved in a buffer. Valid values include CaptureSql, ExecuteAndCaptureSql and ExecuteSql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Sets the number of seconds a statement is given to run before failing with a time-out error.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustServerCertificate</maml:name><maml:description><maml:para>Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Sets the name of the workstation connecting to SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Legacy</maml:name><maml:description><maml:para>Use this switch to create a connection string using System.Data.SqlClient instead of Microsoft.Data.SqlClient.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendConnectionString</maml:name><maml:description><maml:para>Appends to the current connection string. Note that you cannot pass authentication information using this method. Use -SqlInstance and, optionally, -SqlCredential to set authentication information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AccessToken</maml:name><maml:description><maml:para>Basically tells the connection string to ignore authentication. Does not include the AccessToken in the resulting connecstring.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AppendConnectionString</maml:name><maml:description><maml:para>Appends to the current connection string. Note that you cannot pass authentication information using this method. Use -SqlInstance and, optionally, -SqlCredential to set authentication information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationIntent</maml:name><maml:description><maml:para>Declares the application workload type when connecting to a server. Possible values are ReadOnly and ReadWrite.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSeparator</maml:name><maml:description><maml:para>By default, this is "GO"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClientName</maml:name><maml:description><maml:para>By default, this command sets the client's ApplicationName property to "dbatools PowerShell module - dbatools.io". If you're doing anything that requires profiling, you can look for this client name. Using -ClientName allows you to set your own custom client application name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectTimeout</maml:name><maml:description><maml:para>The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. Valid values are greater than or equal to 0 and less than or equal to 2147483647. When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptConnection</maml:name><maml:description><maml:para>When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values are true, false, yes, and no. For more information, see Connection String Syntax. Beginning in .NET Framework 4.5, when TrustServerCertificate is false and Encrypt is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see Accepted wildcards used by server certificates for server authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverPartner</maml:name><maml:description><maml:para>The name of the failover partner server where database mirroring is configured. If the value of this key is "", then Initial Catalog must be present, and its value must not be "". The server name can be 128 characters or less. If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail. If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsActiveDirectoryUniversalAuth</maml:name><maml:description><maml:para>Azure related</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Legacy</maml:name><maml:description><maml:para>Use this switch to create a connection string using System.Data.SqlClient instead of Microsoft.Data.SqlClient.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockTimeout</maml:name><maml:description><maml:para>Sets the time in seconds required for the connection to time out when the current transaction is locked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPoolSize</maml:name><maml:description><maml:para>Sets the maximum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinPoolSize</maml:name><maml:description><maml:para>Sets the minimum number of connections allowed in the connection pool for this specific connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>When used, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiSubnetFailover</maml:name><maml:description><maml:para>If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetworkProtocol</maml:name><maml:description><maml:para>Connect explicitly using 'TcpIp','NamedPipes','Multiprotocol','AppleTalk','BanyanVines','Via','SharedMemory' and 'NWLinkIpxSpx'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>Request a non-pooled connection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PacketSize</maml:name><maml:description><maml:para>Sets the size in bytes of the network packets used to communicate with an instance of SQL Server. Must match at server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PooledConnectionLifetime</maml:name><maml:description><maml:para>When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) causes pooled connections to have the maximum connection timeout.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlExecutionModes</maml:name><maml:description><maml:para>The SqlExecutionModes enumeration contains values that are used to specify whether the commands sent to the referenced connection to the server are executed immediately or saved in a buffer. Valid values include CaptureSql, ExecuteAndCaptureSql and ExecuteSql.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Sets the number of seconds a statement is given to run before failing with a time-out error.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustServerCertificate</maml:name><maml:description><maml:para>Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Sets the name of the workstation connecting to SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection, Connect, ConnectionString Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaConnectionString -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> Creates a connection string that connects using Windows Authentication </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Connect-DbaInstance -SqlInstance sql2016 | New-DbaConnectionString </dev:code><dev:remarks><maml:para> Builds a connected SMO object using Connect-DbaInstance then extracts and displays the connection string </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\> New-DbaConnectionString -SqlInstance sql2014 -Credential $wincred Creates a connection string that connects using alternative Windows credentials </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $sqlcred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> $server = New-DbaConnectionString -SqlInstance sql2014 -Credential $sqlcred Login to sql2014 as SQL login sqladmin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $connstring = New-DbaConnectionString -SqlInstance mydb.database.windows.net -SqlCredential me@myad.onmicrosoft.com -Database db </dev:code><dev:remarks><maml:para> Creates a connection string for an Azure Active Directory login to Azure SQL db. Output looks like this: Data Source=TCP:mydb.database.windows.net,1433;Initial Catalog=db;User ID=me@myad.onmicrosoft.com;Password=fakepass;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name="dbatools PowerShell module - dbatools.io";Authentication="Active Directory Password" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = New-DbaConnectionString -SqlInstance sql2014 -ClientName "mah connection" </dev:code><dev:remarks><maml:para> Creates 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 connection". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = New-DbaConnectionString -SqlInstance sql2014 -AppendConnectionString "Packet Size=4096;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;User Instance=true;" </dev:code><dev:remarks><maml:para> Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = New-DbaConnectionString -SqlInstance sql2014 -NetworkProtocol TcpIp -MultiSubnetFailover </dev:code><dev:remarks><maml:para> Creates a connection string with Windows Authentication that uses TCPIP and has MultiSubnetFailover enabled. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $connstring = New-DbaConnectionString sql2016 -ApplicationIntent ReadOnly </dev:code><dev:remarks><maml:para> Creates a connection string with ReadOnly ApplicationIntent. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaConnectionString</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaConnectionStringBuilder</command:name><command:noun>DbaConnectionStringBuilder</command:noun><command:verb>New</command:verb><maml:description><maml:para>Returns a Microsoft.Data.SqlClient.SqlConnectionStringBuilder with the string specified</maml:para></maml:description></command:details><maml:description><maml:para>Creates a Microsoft.Data.SqlClient.SqlConnectionStringBuilder from a connection string.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaConnectionStringBuilder</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>A Connection String</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationName</maml:name><maml:description><maml:para>The application name to tell SQL Server the connection is associated with.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSource</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InitialCatalog</maml:name><maml:description><maml:para>The initial database on the server to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IntegratedSecurity</maml:name><maml:description><maml:para>Sets to use windows authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UserName</maml:name><maml:description><maml:para>Sql User Name to connect with. Consider using SqlCredential instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Password</maml:name><maml:description><maml:para>Password to use to connect with. Consider using SqlCredential instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>Enable Multiple Active Result Sets.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnEncryptionSetting</maml:name><maml:description><maml:para>Enable Always Encrypted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Legacy</maml:name><maml:description><maml:para>Use this switch to create a connection string using System.Data.SqlClient instead of Microsoft.Data.SqlClient.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>If this switch is enabled, a non-pooled connection will be requested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Set the Workstation Id that is associated with the connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationName</maml:name><maml:description><maml:para>The application name to tell SQL Server the connection is associated with.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnEncryptionSetting</maml:name><maml:description><maml:para>Enable Always Encrypted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>A Connection String</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSource</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InitialCatalog</maml:name><maml:description><maml:para>The initial database on the server to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IntegratedSecurity</maml:name><maml:description><maml:para>Sets to use windows authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Legacy</maml:name><maml:description><maml:para>Use this switch to create a connection string using System.Data.SqlClient instead of Microsoft.Data.SqlClient.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultipleActiveResultSets</maml:name><maml:description><maml:para>Enable Multiple Active Result Sets.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NonPooledConnection</maml:name><maml:description><maml:para>If this switch is enabled, a non-pooled connection will be requested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Password</maml:name><maml:description><maml:para>Password to use to connect with. Consider using SqlCredential instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the SQL Server Instance as a different user. This can be a Windows or SQL Server account. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UserName</maml:name><maml:description><maml:para>Sql User Name to connect with. Consider using SqlCredential instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkstationId</maml:name><maml:description><maml:para>Set the Workstation Id that is associated with the connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlBuild, ConnectionString, Connection Author: zippy1981 | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaConnectionStringBuilder </dev:code><dev:remarks><maml:para> Returns an empty ConnectionStringBuilder </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> "Data Source=localhost,1433;Initial Catalog=AlwaysEncryptedSample;UID=sa;PWD=alwaysB3Encrypt1ng;Application Name=Always Encrypted Sample MVC App;Column Encryption Setting=enabled" | New-DbaConnectionStringBuilder </dev:code><dev:remarks><maml:para> Returns a connection string builder that can be used to connect to the local sql server instance on the default port. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaConnectionStringBuilder</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaCredential</command:name><command:noun>DbaCredential</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new SQL Server credential</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new credential</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaCredential</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Credential name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>The Credential Identity</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to authenticate the Credential Identity</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MappedClassType</maml:name><maml:description><maml:para>Sets the class associated with the credential.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProviderName</maml:name><maml:description><maml:para>Sets the name of the provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If credential exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If credential exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>The Credential Identity</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MappedClassType</maml:name><maml:description><maml:para>Sets the class associated with the credential.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Credential name</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProviderName</maml:name><maml:description><maml:para>Sets the name of the provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to authenticate the Credential Identity</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Credential, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCredential -SqlInstance Server1 -Name MyCredential -Identity "ad\user" -SecurePassword (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> It will create a credential named "MyCredential" that as "ad\user" as identity and a password on server1 if it does not exist. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCredential -SqlInstance Server1 -Identity "MyIdentity" </dev:code><dev:remarks><maml:para> It will create a credential with identity value "MyIdentity" and same name but without a password on server1 if it does not exist. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >>SqlInstance = "Server1" >>Name = "AzureBackupBlobStore" >>Identity = "https://<Azure Storage Account Name>.blob.core.windows.net/<Blob Container Name>" >>SecurePassword = (Get-Credential NoUsernameNeeded).Password # <Azure Storage Account Access Key> >>} PS C:\> New-DbaCredential @params Creates a credential, "AzureBackupBlobStore", on Server1 using the Access Keys for Backup To URL. Identity must be the full URI for the blob container that will be the backup target. The SecurePassword supplied is one of the two Access Keys for the Azure Storage Account. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $sasParams = @{ </dev:code><dev:remarks><maml:para> >>SqlInstance = "server1" >>Name = "https://<azure storage account name>.blob.core.windows.net/<blob container>" >>Identity = "SHARED ACCESS SIGNATURE" >>SecurePassword = (Get-Credential NoUsernameNeeded).Password # <Shared Access Token> >>} PS C:\> New-DbaCredential @sasParams Create a credential on Server1 using a SAS token for Backup To URL. The Name is the full URI for the blob container that will be the backup target. The SecurePassword will be the Shared Access Token (SAS), as a SecureString. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $managedIdentityParams = @{ </dev:code><dev:remarks><maml:para> >>SqlInstance = "server1" >>Name = "https://<azure storage account name>.blob.core.windows.net/<blob container>" >>Identity = "Managed Identity" >>} PS C:\> New-DbaCredential @managedIdentityParams Create a credential on Server1 using a Managed Identity for Backup To URL. The Name is the full URI for the blob container that will be the backup target. As no password is needed in this case, we just don't pass the -SecurePassword parameter. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaCredential</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaCustomError</command:name><command:noun>DbaCustomError</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a user defined message in sys.messages. This command does not support Azure SQL Database.</maml:para></maml:description></command:details><maml:description><maml:para>This command provides a wrapper for the sp_addmessage system procedure that allows for user defined messages to be added to sys.messages.</maml:para><maml:para>Note: See the remarks section of the documentation for sp_addmessage regarding the addition of non-English messages. The U.S. English message needs to be added first and the severity must be the same.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaCustomError</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageID</maml:name><maml:description><maml:para>An integer between 50001 and 2147483647.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Severity</maml:name><maml:description><maml:para>Severity level between 1 and 25.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageText</maml:name><maml:description><maml:para>Error message text with max length of 255 characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Language for this message. The valid values for Language are contained in the Name and Alias columns from sys.syslanguages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithLog</maml:name><maml:description><maml:para>Always write this message to the Windows application log and the SQL Server Error Log when it occurs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Language for this message. The valid values for Language are contained in the Name and Alias columns from sys.syslanguages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageID</maml:name><maml:description><maml:para>An integer between 50001 and 2147483647.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageText</maml:name><maml:description><maml:para>Error message text with max length of 255 characters.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Severity</maml:name><maml:description><maml:para>Severity level between 1 and 25.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithLog</maml:name><maml:description><maml:para>Always write this message to the Windows application log and the SQL Server Error Log when it occurs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Error Author: Adam Lancaster, github.com/lancasteradam Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCustomError -SqlInstance sqldev01, sqldev02 -MessageID 70001 -Severity 16 -MessageText "test" </dev:code><dev:remarks><maml:para> Creates a new custom message on the sqldev01 and sqldev02 instances with ID 70001, severity 16, and text "test". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCustomError -SqlInstance sqldev01 -MessageID 70001 -Severity 16 -MessageText "test" -Language "French" </dev:code><dev:remarks><maml:para> Creates a new custom message on the sqldev01 instance for the french language with ID 70001, severity 16, and text "test". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaCustomError -SqlInstance sqldev01 -MessageID 70001 -Severity 16 -MessageText "test" -WithLog </dev:code><dev:remarks><maml:para> Creates a new custom message on the sqldev01 instance with ID 70001, severity 16, text "test", and enables the log mechanism. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance sqldev01 </dev:code><dev:remarks><maml:para> PS C:\> $newMessage = New-DbaCustomError -SqlInstance $server -MessageID 70000 -Severity 16 -MessageText "test_70000" Creates a new custom message on the sqldev01 instance with ID 70000, severity 16, and text "test_70000" To modify the custom message at a later time the following can be done to change the severity from 16 to 20: PS C:\> $original = $server.UserDefinedMessages | Where-Object ID -eq 70000 PS C:\> $messageID = $original.ID PS C:\> $severity = 20 PS C:\> $text = $original.Text PS C:\> $language = $original.Language PS C:\> $removed = Remove-DbaCustomError -SqlInstance $server -MessageID 70000 PS C:\> $alteredMessage = New-DbaCustomError -SqlInstance $server -MessageID $messageID -Severity $severity -MessageText $text -Language $language -WithLog The resulting updated message object is available in $alteredMessage. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaCustomError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDacOption</command:name><command:noun>DbaDacOption</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new Microsoft.SqlServer.Dac.DacExtractOptions/DacExportOptions object depending on the chosen Type</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new Microsoft.SqlServer.Dac.DacExtractOptions/DacExportOptions object that can be used during DacPackage extract. Basically saves you the time from remembering the SMO assembly name ;)</maml:para><maml:para>See:</maml:para><maml:para>https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dac.dacexportoptions.aspx</maml:para><maml:para>https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dac.dacextractoptions.aspx</maml:para><maml:para>for more information</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDacOption</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>Choosing an intended action: Publish or Export.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishXml</maml:name><maml:description><maml:para>Specifies the publish profile which will include options and sqlCmdVariables.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>A Hashtable that would be used to initialize Options object properties. If you want to specify DeployOptions parameters, which is a property of the options object, add the DeployOptions key with an appropriate hashtable as a value: @{DeployOptions=@{ConnectionTimeout=5}}</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Action</maml:name><maml:description><maml:para>Choosing an intended action: Publish or Export.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Property</maml:name><maml:description><maml:para>A Hashtable that would be used to initialize Options object properties. If you want to specify DeployOptions parameters, which is a property of the options object, add the DeployOptions key with an appropriate hashtable as a value: @{DeployOptions=@{ConnectionTimeout=5}}</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishXml</maml:name><maml:description><maml:para>Specifies the publish profile which will include options and sqlCmdVariables.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Dacpac Author: Kirill Kravtsov (@nvarscar), nvarscar.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Export </dev:code><dev:remarks><maml:para> PS C:\> $options.ExtractAllTableData = $true PS C:\> $options.CommandTimeout = 0 PS C:\> Export-DbaDacPackage -SqlInstance sql2016 -Database DB1 -Options $options Uses DacOption object to set the CommandTimeout to 0 then extracts the dacpac for SharePoint_Config on sql2016 to C:\temp\SharePoint_Config.dacpac including all table data. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Export -Property @{ExtractAllTableData=$true;CommandTimeout=0} </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaDacPackage -SqlInstance sql2016 -Database DB1 -Options $options Creates a pre-initialized DacOption object and uses it to extrac a DacPac from the database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Publish </dev:code><dev:remarks><maml:para> PS C:\> $options.DeployOptions.DropObjectsNotInSource = $true PS C:\> Publish-DbaDacPackage -SqlInstance sql2016 -Database DB1 -Options $options -Path c:\temp\db.dacpac Uses DacOption object to set Deployment Options and publish the db.dacpac dacpac file as DB1 on sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDacOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDacProfile</command:name><command:noun>DbaDacProfile</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new Publish Profile.</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para><maml:para>This 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.</maml:para><maml:para>If you use Visual Studio you can open a publish.xml file and use the ui to edit the file -</maml:para><maml:para>To create a new file, right click on an SSDT project, choose "Publish" then "Load Profile" and load your profile or create a new one.</maml:para><maml:para>Once you have loaded it in Visual Studio, clicking advanced shows you the list of options available to you.</maml:para><maml:para>For 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)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDacProfile</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Alternatively, you can provide a ConnectionString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database name you are targeting</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory where you would like to save the profile xml file(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>The connection string to the database you are upgrading. Alternatively, you can provide a SqlInstance (and optionally SqlCredential) and the script will connect and generate the connectionstring.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishOptions</maml:name><maml:description><maml:para>Optional hashtable to set publish options. Key/value pairs in the hashtable get converted to strings of "<key>value</key>".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>The connection string to the database you are upgrading. Alternatively, you can provide a SqlInstance (and optionally SqlCredential) and the script will connect and generate the connectionstring.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database name you are targeting</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory where you would like to save the profile xml file(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishOptions</maml:name><maml:description><maml:para>Optional hashtable to set publish options. Key/value pairs in the hashtable get converted to strings of "<key>value</key>".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Alternatively, you can provide a ConnectionString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Dacpac Author: Richie lee (@richiebzzzt) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDacProfile -SqlInstance sql2017 -SqlCredential ad\sqldba -Database WorldWideImporters -Path C:\temp </dev:code><dev:remarks><maml:para> In this example, a prompt will appear for alternative credentials, then a connection will be made to sql2017. Using that connection, the ConnectionString will be extracted and used within the Publish Profile XML file which will be created at C:\temp\sql2017-WorldWideImporters-publish.xml </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDacProfile -Database WorldWideImporters -Path C:\temp -ConnectionString "SERVER=(localdb)\MSSQLLocalDB;Integrated Security=True;Database=master" </dev:code><dev:remarks><maml:para> In this example, no connections are made, and a Publish Profile XML would be created at C:\temp\localdb-MSSQLLocalDB-WorldWideImporters-publish.xml </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDacProfile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database</maml:para></maml:description></command:details><maml:description><maml:para>This command creates a new database.</maml:para><maml:para>It allows creation with multiple files, and sets all growth settings to be fixed size rather than percentage growth. The autogrowth settings are obtained from the modeldev file in the model database when not supplied as command line arguments.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDatabase</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the new database or databases to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collation</maml:name><maml:description><maml:para>The database collation, if not supplied the default server collation will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>The recovery model for the database, if not supplied the recovery model from the model database will be used. Valid options are: Simple, Full, BulkLogged.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The login that will be used as the database owner.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFilePath</maml:name><maml:description><maml:para>The location that data files will be placed, otherwise the default SQL Server data path will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFilePath</maml:name><maml:description><maml:para>The location the log file will be placed, otherwise the default SQL Server log path will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFilesize</maml:name><maml:description><maml:para>The size in MB for the Primary file. If this is less than the primary file size for the model database, then the model size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFileGrowth</maml:name><maml:description><maml:para>The size in MB that the Primary file will autogrow by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFileMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB for the Primary File. If this is less than the primary file size for the model database, then the model size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogSize</maml:name><maml:description><maml:para>The size in MB that the Transaction log will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogGrowth</maml:name><maml:description><maml:para>The amount in MB that the log file will be set to autogrow by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB. If this is less than the log file size for the model database, then the model log size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFilesize</maml:name><maml:description><maml:para>The size in MB of the files to be added to the Secondary filegroup. Each file added will be created with this size setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileGrowth</maml:name><maml:description><maml:para>The amount in MB that the Secondary files will be set to autogrow by. Use 0 for no growth allowed. Each file added will be created with this growth setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB for the Secondary data files to grow to. Each file added will be created with this max size setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileCount</maml:name><maml:description><maml:para>The number of files to create in the Secondary filegroup for the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultFileGroup</maml:name><maml:description><maml:para>Sets the default file group. Either primary or secondary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileSuffix</maml:name><maml:description><maml:para>The data file suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileSuffix</maml:name><maml:description><maml:para>The log file suffix. Defaults to "_log"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDataFileSuffix</maml:name><maml:description><maml:para>The secondary data file suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collation</maml:name><maml:description><maml:para>The database collation, if not supplied the default server collation will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFilePath</maml:name><maml:description><maml:para>The location that data files will be placed, otherwise the default SQL Server data path will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileSuffix</maml:name><maml:description><maml:para>The data file suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultFileGroup</maml:name><maml:description><maml:para>Sets the default file group. Either primary or secondary.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFilePath</maml:name><maml:description><maml:para>The location the log file will be placed, otherwise the default SQL Server log path will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileSuffix</maml:name><maml:description><maml:para>The log file suffix. Defaults to "_log"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogGrowth</maml:name><maml:description><maml:para>The amount in MB that the log file will be set to autogrow by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB. If this is less than the log file size for the model database, then the model log size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogSize</maml:name><maml:description><maml:para>The size in MB that the Transaction log will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the new database or databases to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The login that will be used as the database owner.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFileGrowth</maml:name><maml:description><maml:para>The size in MB that the Primary file will autogrow by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFileMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB for the Primary File. If this is less than the primary file size for the model database, then the model size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimaryFilesize</maml:name><maml:description><maml:para>The size in MB for the Primary file. If this is less than the primary file size for the model database, then the model size will be used instead.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>The recovery model for the database, if not supplied the recovery model from the model database will be used. Valid options are: Simple, Full, BulkLogged.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryDataFileSuffix</maml:name><maml:description><maml:para>The secondary data file suffix.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileCount</maml:name><maml:description><maml:para>The number of files to create in the Secondary filegroup for the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileGrowth</maml:name><maml:description><maml:para>The amount in MB that the Secondary files will be set to autogrow by. Use 0 for no growth allowed. Each file added will be created with this growth setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFileMaxSize</maml:name><maml:description><maml:para>The maximum permitted size in MB for the Secondary data files to grow to. Each file added will be created with this max size setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondaryFilesize</maml:name><maml:description><maml:para>The size in MB of the files to be added to the Secondary filegroup. Each file added will be created with this size setting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database Author: Matthew Darwin (@evoDBA, naturalselectiondba.wordpress.com) | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDatabase -SqlInstance sql1 </dev:code><dev:remarks><maml:para> Creates a randomly named database (random-N) on instance sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDatabase -SqlInstance sql1 -Name dbatools, dbachecks </dev:code><dev:remarks><maml:para> Creates a database named dbatools and a database named dbachecks on sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDatabase -SqlInstance sql1, sql2, sql3 -Name multidb, multidb2 -SecondaryFilesize 20 -SecondaryFileGrowth 20 -LogSize 20 -LogGrowth 20 </dev:code><dev:remarks><maml:para> Creates two databases, multidb and multidb2, on 3 instances (sql1, sql2 and sql3) and sets the secondary data file size to 20MB, the file growth to 20MB and the log growth to 20MB for each </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDatabase -SqlInstance sql1 -Name nondefault -DataFilePath M:\Data -LogFilePath 'L:\Logs with spaces' -SecondaryFileCount 2 </dev:code><dev:remarks><maml:para> Creates a database named nondefault and places data files in in the M:\data directory and log files in "L:\Logs with spaces". Creates a secondary group with 2 files in the Secondary filegroup. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $databaseParams = @{ </dev:code><dev:remarks><maml:para> >> SqlInstance = "sql1" >> Name = "newDb" >> LogSize = 32 >> LogMaxSize = 512 >> PrimaryFilesize = 64 >> PrimaryFileMaxSize = 512 >> SecondaryFilesize = 64 >> SecondaryFileMaxSize = 512 >> LogGrowth = 32 >> PrimaryFileGrowth = 64 >> SecondaryFileGrowth = 64 >> DataFileSuffix = "_PRIMARY" >> LogFileSuffix = "_Log" >> SecondaryDataFileSuffix = "_MainData" >> } >> New-DbaDatabase @databaseParams Creates a new database named newDb on the sql1 instance and sets the file sizes, max sizes, and growth as specified. The resulting filenames will take the form: newDb_PRIMARY newDb_Log newDb_MainData_1 (Secondary filegroup files) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbAsymmetricKey</command:name><command:noun>DbaDbAsymmetricKey</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database asymmetric key</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database asymmetric key. If no database is specified, the asymmetric key will be created in master.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbAsymmetricKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Optional name to create the asymmetric key. Defaults to database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the asymmetric key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Optional password - if no password is supplied, the password will be protected by the master key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>User within the database who will own the key. Defaults to the user creating the key if not specified. User must exist withing the database already</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeySource</maml:name><maml:description><maml:para>The path to the Executable, File or Assembly to be passed in. The path is parsed by the SQL Server instance, so needs to be visible to the instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeySourceType</maml:name><maml:description><maml:para>The source of external keys loaded in, can be one of Executable, File or Assembly We do not currently support Provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Algorithm</maml:name><maml:description><maml:para>The algorithm used to generate the key. Can be one of RSA512, RSA1024, RSA1024, RSA2048, RSA3072 or RSA4096. If not specified RSA2048 is the default This value will be ignored when KeySource is supplied, as the algorithm is embedded in the KeySource</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Algorithm</maml:name><maml:description><maml:para>The algorithm used to generate the key. Can be one of RSA512, RSA1024, RSA1024, RSA2048, RSA3072 or RSA4096. If not specified RSA2048 is the default This value will be ignored when KeySource is supplied, as the algorithm is embedded in the KeySource</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the asymmetric key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeySource</maml:name><maml:description><maml:para>The path to the Executable, File or Assembly to be passed in. The path is parsed by the SQL Server instance, so needs to be visible to the instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeySourceType</maml:name><maml:description><maml:para>The source of external keys loaded in, can be one of Executable, File or Assembly We do not currently support Provider</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Optional name to create the asymmetric key. Defaults to database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>User within the database who will own the key. Defaults to the user creating the key if not specified. User must exist withing the database already</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Optional password - if no password is supplied, the password will be protected by the master key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbAsymmetricKey -SqlInstance Server1 </dev:code><dev:remarks><maml:para> You will be prompted to securely enter your password, then an asymmetric key will be created in the master database on server1 if it does not exist. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbAsymmetricKey -SqlInstance Server1 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to install but prompts to securely enter your password and creates an asymmetric key in the 'db1' database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbAsymmetrickKey -SqlInstance Server1 -Database enctest -KeySourceType File -KeySource c:\keys\NewKey.snk -Name BackupKey -Owner KeyOwner </dev:code><dev:remarks><maml:para> Installs the key pair held in NewKey.snk into the enctest database creating an AsymmetricKey called BackupKey, which will be owned by KeyOwner </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbAsymmetricKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database certificate</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database certificate. If no database is specified, the certificate will be created in master.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Optional name to create the certificate. Defaults to database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Optional subject that will be used when creating all certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>Optional start date that will be used when creating all certificates By default, certs will start immediately</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExpirationDate</maml:name><maml:description><maml:para>Optional expiration that will be used when creating all certificates By default, certs will last 5 years</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveForServiceBrokerDialog</maml:name><maml:description><maml:para>Microsoft has not provided a description so we can only assume the cert is active for service broker dialog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Optional password - if no password is supplied, the password will be protected by the master key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ActiveForServiceBrokerDialog</maml:name><maml:description><maml:para>Microsoft has not provided a description so we can only assume the cert is active for service broker dialog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExpirationDate</maml:name><maml:description><maml:para>Optional expiration that will be used when creating all certificates By default, certs will last 5 years</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Optional name to create the certificate. Defaults to database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Optional password - if no password is supplied, the password will be protected by the master key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>Optional start date that will be used when creating all certificates By default, certs will start immediately</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Optional subject that will be used when creating all certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbCertificate -SqlInstance Server1 </dev:code><dev:remarks><maml:para> You 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbCertificate -SqlInstance Server1 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to install but prompts to securely enter your password and creates a certificate in the 'db1' database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbDataGeneratorConfig</command:name><command:noun>DbaDbDataGeneratorConfig</command:noun><command:verb>New</command:verb><maml:description><maml:para>Generates a new data generation configuration file.</maml:para></maml:description></command:details><maml:description><maml:para>Generates a new data generation configuration file. This file is important to apply any data generation to a table in a database.</maml:para><maml:para>Read more here:</maml:para><maml:para>https://sachabarbs.wordpress.com/2018/06/11/bogus-simple-fake-data-tool/</maml:para><maml:para>https://github.com/bchavez/Bogus</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbDataGeneratorConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetIdentity</maml:name><maml:description><maml:para>Resets the identity column for a table to it's starting value. By default it will continue with the next identity.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TruncateTable</maml:name><maml:description><maml:para>Truncates the tabel befoe inserting the values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rows</maml:name><maml:description><maml:para>Amount of rows that need to be generated. The default is 1000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path where to save the generated JSON files. The naming convention will be "servername.databasename.tables.json".</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forcefully execute commands when needed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forcefully execute commands when needed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path where to save the generated JSON files. The naming convention will be "servername.databasename.tables.json".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetIdentity</maml:name><maml:description><maml:para>Resets the identity column for a table to it's starting value. By default it will continue with the next identity.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rows</maml:name><maml:description><maml:para>Amount of rows that need to be generated. The default is 1000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TruncateTable</maml:name><maml:description><maml:para>Truncates the tabel befoe inserting the values.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration, Database Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbDataGeneratorConfig -SqlInstance SQLDB1 -Database DB1 -Path C:\Temp\clone </dev:code><dev:remarks><maml:para> Process all tables and columns for database DB1 on instance SQLDB1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbDataGeneratorConfig -SqlInstance SQLDB1 -Database DB1 -Table Customer -Path C:\Temp\clone </dev:code><dev:remarks><maml:para> Process only table Customer with all the columns </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbDataGeneratorConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbEncryptionKey</command:name><command:noun>DbaDbEncryptionKey</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database encryption key that is encrypted by the instance certificate</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database encryption key. If no database is specified, the encryption key will be created in master.</maml:para><maml:para>In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbEncryptionKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the encryption key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the encryptor (Certificate or Asymmetric Key) in master that will be used. Tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies an encryption type of Certificate or Asymmetric Key. Defaults to Certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specifies an encryption algorithm. Defaults to Aes256. Options are: "Aes128", "Aes192", "Aes256", "TripleDes"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>When a certificate encryptor is used, this command will refuse to create an encryption key for a certificate that has not been backed up Use Force to create an encryption key even though the specified cert has not been backed up</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the encryption key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specifies an encryption algorithm. Defaults to Aes256. Options are: "Aes128", "Aes192", "Aes256", "TripleDes"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the encryptor (Certificate or Asymmetric Key) in master that will be used. Tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>When a certificate encryptor is used, this command will refuse to create an encryption key for a certificate that has not been backed up Use Force to create an encryption key even though the specified cert has not been backed up</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specifies an encryption type of Certificate or Asymmetric Key. Defaults to Certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $dbs = Get-DbaDatabase -SqlInstance sql01 -Database pubs </dev:code><dev:remarks><maml:para> PS C:\> $db | New-DbaDbEncryptionKey Creates an Aes256 encryption key for the pubs database on sql01. Automatically selects a cert database in master if one (and only one) non-system certificate exists. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbEncryptionKey -SqlInstance sql01 -Database db1 -EncryptorName "sql01 cert" -EncryptionAlgorithm Aes192 -Confirm:$false </dev:code><dev:remarks><maml:para> Creates an Aes192 encryption key for the pubs database on sql01 using the certiciated named "sql01 cert" in master. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbEncryptionKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbFileGroup</command:name><command:noun>DbaDbFileGroup</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new empty filegroup.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new filegroup for the specified database(s). The filegroup properties cannot be set on an empty filegroup, so it is necessary to add one or more files and then use the Set-DbaDbFileGroup command to set the filegroup properties.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbFileGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name of the new filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroupType</maml:name><maml:description><maml:para>The type of the file group. Possible values are "FileStreamDataFileGroup", "MemoryOptimizedDataFileGroup", "RowsFileGroup". The default is "RowsFileGroup".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name of the new filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroupType</maml:name><maml:description><maml:para>The type of the file group. Possible values are "FileStreamDataFileGroup", "MemoryOptimizedDataFileGroup", "RowsFileGroup". The default is "RowsFileGroup".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, File, FileGroup Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 </dev:code><dev:remarks><maml:para> Creates the HRFG1 filegroup on the TestDb database on the sqldev1 instance with the default options for the filegroup. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -FileGroupType FileStreamDataFileGroup </dev:code><dev:remarks><maml:para> Creates a filestream filegroup named HRFG1 on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -FileGroupType MemoryOptimizedDataFileGroup </dev:code><dev:remarks><maml:para> Creates a MemoryOptimized data filegroup named HRFG1 on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev1 -Database TestDb | New-DbaDbFileGroup -FileGroup HRFG1 </dev:code><dev:remarks><maml:para> Passes in the TestDB database via pipeline and creates the HRFG1 filegroup on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbFileGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbMailAccount</command:name><command:noun>DbaDbMailAccount</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database mail account</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database mail account</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbMailAccount</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>The name of the account to be created.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayName</maml:name><maml:description><maml:para>Sets the name of the mail account that is displayed in messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Sets the description of the purpose of the mail account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>Sets the e-mail address of the mail account.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplyToAddress</maml:name><maml:description><maml:para>Sets the e-mail address to which the mail account replies.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailServer</maml:name><maml:description><maml:para>The name of the mail server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Mail Account will be created even if the mail server is not present.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>The name of the account to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Sets the description of the purpose of the mail account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayName</maml:name><maml:description><maml:para>Sets the name of the mail account that is displayed in messages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>Sets the e-mail address of the mail account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Mail Account will be created even if the mail server is not present.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailServer</maml:name><maml:description><maml:para>The name of the mail server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplyToAddress</maml:name><maml:description><maml:para>Sets the e-mail address to which the mail account replies.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DatabaseMail, DbMail, Mail Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $account = New-DbaDbMailAccount -SqlInstance sql2017 -Account 'The DBA Team' -EmailAddress admin@ad.local -MailServer smtp.ad.local </dev:code><dev:remarks><maml:para> Creates a new database mail account with the email address admin@ad.local on sql2017 named "The DBA Team" using the smtp.ad.local mail server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbMailAccount</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbMailProfile</command:name><command:noun>DbaDbMailProfile</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database mail profile</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database mail profile, and optionally associates it to a database mail account</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbMailProfile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>The name of the profile to be created.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Sets the description of the purpose of the mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailAccountName</maml:name><maml:description><maml:para>Associates a db mail account to link to this db mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailAccountPriority</maml:name><maml:description><maml:para>Sets the priority of the linked db mail account when linking to this db mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>Sets the description of the purpose of the mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailAccountName</maml:name><maml:description><maml:para>Associates a db mail account to link to this db mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MailAccountPriority</maml:name><maml:description><maml:para>Sets the priority of the linked db mail account when linking to this db mail profile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>The name of the profile to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DatabaseMail, DbMail, Mail Author: Ian Lanham (@ilanham) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $profile = New-DbaDbMailProfile -SqlInstance sql2017 -Profile 'The DBA Team' </dev:code><dev:remarks><maml:para> Creates a new database mail profile. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbMailProfile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbMaskingConfig</command:name><command:noun>DbaDbMaskingConfig</command:noun><command:verb>New</command:verb><maml:description><maml:para>Generates a new data masking configuration file to be used with Invoke-DbaDbDataMasking</maml:para></maml:description></command:details><maml:description><maml:para>Generates a new data masking configuration file. This file is important to apply any data masking to the data in a database.</maml:para><maml:para>Note that the following column and data types are not currently supported:</maml:para><maml:para>Identity</maml:para><maml:para>ForeignKey</maml:para><maml:para>Computed</maml:para><maml:para>Hierarchyid</maml:para><maml:para>Geography</maml:para><maml:para>Geometry</maml:para><maml:para>Xml</maml:para><maml:para>Read more here:</maml:para><maml:para>https://sachabarbs.wordpress.com/2018/06/11/bogus-simple-fake-data-tool/</maml:para><maml:para>https://github.com/bchavez/Bogus</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbMaskingConfig</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path where to save the generated JSON files. Th naming convention will be "servername.databasename.tables.json"</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleCount</maml:name><maml:description><maml:para>Amount of rows to sample to make an assessment. The default is 100</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KnownNameFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PatternFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultKnownName</maml:name><maml:description><maml:para>Excludes the default known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultPattern</maml:name><maml:description><maml:para>Excludes the default patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forcefully execute commands when needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Used for piping the values from Invoke-DbaDbPiiScan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CharacterString</maml:name><maml:description><maml:para>The characters to use in string data. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' by default</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Column</maml:name><maml:description><maml:para>Columns to process. By default all the columns will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Databases to process through</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultKnownName</maml:name><maml:description><maml:para>Excludes the default known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDefaultPattern</maml:name><maml:description><maml:para>Excludes the default patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forcefully execute commands when needed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Used for piping the values from Invoke-DbaDbPiiScan</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KnownNameFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom known names</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Locale</maml:name><maml:description><maml:para>Set the local to enable certain settings in the masking</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path where to save the generated JSON files. Th naming convention will be "servername.databasename.tables.json"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PatternFilePath</maml:name><maml:description><maml:para>Points to a file containing the custom patterns</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SampleCount</maml:name><maml:description><maml:para>Amount of rows to sample to make an assessment. The default is 100</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Tables to process. By default all the tables will be processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Masking, DataMasking Author: Sander Stad (@sqlstad, sqlstad.nl) | Chrissy LeMaire (@cl, netnerds.net) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMaskingConfig -SqlInstance SQLDB1 -Database DB1 -Path C:\Temp\clone </dev:code><dev:remarks><maml:para> Process all tables and columns for database DB1 on instance SQLDB1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMaskingConfig -SqlInstance SQLDB1 -Database DB1 -Table Customer -Path C:\Temp\clone </dev:code><dev:remarks><maml:para> Process only table Customer with all the columns </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMaskingConfig -SqlInstance SQLDB1 -Database DB1 -Table Customer -Column City -Path C:\Temp\clone </dev:code><dev:remarks><maml:para> Process only table Customer and only the column named "City" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbMaskingConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbMasterKey</command:name><command:noun>DbaDbMasterKey</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database master key</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database master key. If no database is specified, the master key will be created in master.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbMasterKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Enables easy creation of a secure password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the master key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to create the key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Enables easy creation of a secure password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the master key will be created. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Database object piped in from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to create the key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMasterKey -SqlInstance Server1 </dev:code><dev:remarks><maml:para> You 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMasterKey -SqlInstance Server1 -Credential usernamedoesntmatter </dev:code><dev:remarks><maml:para> You will be prompted by a credential interface to securely enter your password, then a master key will be created in the master database on server1 if it does not exist. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbMasterKey -SqlInstance Server1 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to install but prompts in th console to securely enter your password and creates a master key in the 'db1' database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbRole</command:name><command:noun>DbaDbRole</command:noun><command:verb>New</command:verb><maml:description><maml:para>Create new database roles for each database(s)/ instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The New-DbaDbRole create new roles on database(s)/ instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbRole</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the role. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the role. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, User Author: Claudio Silva (@ClaudioESSilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbRole -SqlInstance sql2017a -Database db1 -Role 'dbExecuter' </dev:code><dev:remarks><maml:para> Will create a new role named dbExecuter within db1 on sql2017a instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbSchema</command:name><command:noun>DbaDbSchema</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new database schema and assigns an owner.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new database schema and assigns an owner.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbSchema</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the new schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name of the database user that will own the schema(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the new schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name of the database user that will own the schema(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Schema, Database Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSchema -SqlInstance localhost -Database example1 -Schema TestSchema1 </dev:code><dev:remarks><maml:para> Creates the TestSchema1 schema in the example1 database in the localhost instance. The dbo user will be the owner of the schema. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSchema -SqlInstance localhost -Database example1 -Schema TestSchema1, TestSchema2 -SchemaOwner dbatools </dev:code><dev:remarks><maml:para> Creates the TestSchema1 and TestSchema2 schemas in the example1 database in the localhost instance and assigns the dbatools user as the owner of the schemas. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSchema -SqlInstance localhost, localhost\sql2017 -Database example1 -Schema TestSchema1, TestSchema2 -SchemaOwner dbatools </dev:code><dev:remarks><maml:para> Creates the TestSchema1 and TestSchema2 schemas in the example1 database in the localhost and localhost\sql2017 instances and assigns the dbatools user as the owner of the schemas. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost, localhost\sql2017 -Database example1 | New-DbaDbSchema -Schema TestSchema1, TestSchema2 -SchemaOwner dbatools </dev:code><dev:remarks><maml:para> Passes in the example1 db via pipeline and creates the TestSchema1 and TestSchema2 schemas and assigns the dbatools user as the owner of the schemas. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbSchema</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbSequence</command:name><command:noun>DbaDbSequence</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a sequence.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a sequence in the database(s) specified. SQL Server 2012 and higher are supported.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbSequence</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the new sequence</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IntegerType</maml:name><maml:description><maml:para>The integer type for the sequence. The default is bigint. User defined integer types can be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartWith</maml:name><maml:description><maml:para>The first value for the sequence to start with. The default is 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementBy</maml:name><maml:description><maml:para>The value to increment by. The default is 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinValue</maml:name><maml:description><maml:para>The minimum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>The maximum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cycle</maml:name><maml:description><maml:para>Switch parameter that indicates if the sequence should cycle the values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CacheSize</maml:name><maml:description><maml:para>The integer size of the cache. To specify NO CACHE for a sequence use -CacheSize 0. As noted in the Microsoft documentation if the cache size is not specified the Database Engine will select a size.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CacheSize</maml:name><maml:description><maml:para>The integer size of the cache. To specify NO CACHE for a sequence use -CacheSize 0. As noted in the Microsoft documentation if the cache size is not specified the Database Engine will select a size.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cycle</maml:name><maml:description><maml:para>Switch parameter that indicates if the sequence should cycle the values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementBy</maml:name><maml:description><maml:para>The value to increment by. The default is 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IntegerType</maml:name><maml:description><maml:para>The integer type for the sequence. The default is bigint. User defined integer types can be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>The maximum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinValue</maml:name><maml:description><maml:para>The minimum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the new sequence</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartWith</maml:name><maml:description><maml:para>The first value for the sequence to start with. The default is 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Data, Sequence, Table Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSequence -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence -StartWith 10000 -IncrementBy 10 </dev:code><dev:remarks><maml:para> Creates a new sequence TestSequence in the TestDB database on the sqldev01 instance. The sequence will start with 10000 and increment by 10. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSequence -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence -Cycle </dev:code><dev:remarks><maml:para> Creates a new sequence TestSequence in the TestDB database on the sqldev01 instance. The sequence will cycle the numbers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01 -Database TestDB | New-DbaDbSequence -Sequence TestSequence -Schema TestSchema -IntegerType bigint </dev:code><dev:remarks><maml:para> Using a pipeline this command creates a new bigint sequence named TestSchema.TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbSequence</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbSnapshot</command:name><command:noun>DbaDbSnapshot</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates database snapshots</maml:para></maml:description></command:details><maml:description><maml:para>Creates database snapshots without hassles</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbSnapshot</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>Creates snapshot for all eligible databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The specific snapshot name you want to create. Works only if you target a single database. If you need to create multiple snapshot, you must use the NameSuffix parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NameSuffix</maml:name><maml:description><maml:para>When you pass a simple string, it'll be appended to use it to build the name of the snapshot. By default snapshots are created with yyyyMMdd_HHmmss suffix You can also pass a standard placeholder, in which case it'll be interpolated (e.g. '{0}' gets replaced with the database name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Snapshot files will be created here (by default the file structure will be created in the same folder as the base db)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Databases with Filestream FG can be snapshotted, but the Filestream FG is marked offline in the snapshot. To create a "partial" snapshot, you need to pass -Force explicitly NB: You can't then restore the Database from the newly-created snapshot. For details, check https://msdn.microsoft.com/en-us/library/bb895334.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows Piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>Creates snapshot for all eligible databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Databases with Filestream FG can be snapshotted, but the Filestream FG is marked offline in the snapshot. To create a "partial" snapshot, you need to pass -Force explicitly NB: You can't then restore the Database from the newly-created snapshot. For details, check https://msdn.microsoft.com/en-us/library/bb895334.aspx</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows Piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The specific snapshot name you want to create. Works only if you target a single database. If you need to create multiple snapshot, you must use the NameSuffix parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NameSuffix</maml:name><maml:description><maml:para>When you pass a simple string, it'll be appended to use it to build the name of the snapshot. By default snapshots are created with yyyyMMdd_HHmmss suffix You can also pass a standard placeholder, in which case it'll be interpolated (e.g. '{0}' gets replaced with the database name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Snapshot files will be created here (by default the file structure will be created in the same folder as the base db)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Snapshot, Restore, Database Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting </dev:code><dev:remarks><maml:para> Creates snapshot for HR and Accounting, returning a custom object displaying Server, Database, DatabaseCreated, SnapshotOf, SizeMB, DatabaseCreated, PrimaryFilePath, Status, Notes </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR -Name HR_snap </dev:code><dev:remarks><maml:para> Creates snapshot named "HR_snap" for HR </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR -NameSuffix 'fool_{0}_snap' </dev:code><dev:remarks><maml:para> Creates snapshot named "fool_HR_snap" for HR </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSnapshot -SqlInstance sqlserver2014a -Database HR, Accounting -Path F:\snapshotpath </dev:code><dev:remarks><maml:para> Creates snapshots for HR and Accounting databases, storing files under the F:\snapshotpath\ dir </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database df | New-DbaDbSnapshot </dev:code><dev:remarks><maml:para> Creates a snapshot for the database df on sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbSnapshot</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbSynonym</command:name><command:noun>DbaDbSynonym</command:noun><command:verb>New</command:verb><maml:description><maml:para>Create new synonym for each database(s) / instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The New-DbaDbSynonym creates new synonym on database(s) / instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbSynonym</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema of the synonym. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseServer</maml:name><maml:description><maml:para>The linked server name. If specified then BaseDatabase and BaseSchema are required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseDatabase</maml:name><maml:description><maml:para>The object parent database name. If specified then BaseSchema is required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseSchema</maml:name><maml:description><maml:para>The object parent schema name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseObject</maml:name><maml:description><maml:para>The object name. Can be table, view, stored procedure, function, etc.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseDatabase</maml:name><maml:description><maml:para>The object parent database name. If specified then BaseSchema is required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseObject</maml:name><maml:description><maml:para>The object name. Can be table, view, stored procedure, function, etc.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseSchema</maml:name><maml:description><maml:para>The object parent schema name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BaseServer</maml:name><maml:description><maml:para>The linked server name. If specified then BaseDatabase and BaseSchema are required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema of the synonym. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym to create.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Synonym, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Synonym synObj1 -BaseObject Obj1 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 in db1 database in dbo schema on sql2017a instance for Obj1 object in the same database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Synonym synObj1 -BaseObject Obj1 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 in db1 database in dbo schema on sql2017a instance for Obj1 object in the same database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Schema sch1 -Synonym synObj1 -BaseObject Obj1 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 within dbo schema in db1 database on sql2017a instance for Obj1 object in the same database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Schema sch1 -Synonym synObj1 -BaseObject Obj1 -BaseSchema bSch2 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 within sch1 schema in db1 database on sql2017a instance for Obj1 object within bSch2 schema in the same database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Schema sch1 -Synonym synObj1 -BaseObject Obj1 -BaseSchema bSch2 -BaseDatabase bDb3 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 within sch1 schema in db1 database on sql2017a instance for Obj1 object within bSch2 schema in bDb3 database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbSynonym -SqlInstance sql2017a -Database db1 -Schema sch1 -Synonym synObj1 -BaseObject Obj1 -BaseSchema bSch2 -BaseDatabase bDb3 -BaseServer bSrv4 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 within sch1 schema in db1 database on sql2017a instance for Obj1 object within bSch2 schema in bDb3 database on bSrv4 linked server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017a -ExcludeSystem | New-DbaDbSynonym -Synonym synObj1 -BaseObject Obj1 </dev:code><dev:remarks><maml:para> Will create a new synonym named synObj1 within dbo schema in all user databases on sql2017a instance for Obj1 object in the respective databases. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbSynonym</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbTable</command:name><command:noun>DbaDbTable</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new table in a database</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new table in a database</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbTable</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases where the table will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the table</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema for the table, defaults to dbo</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>Hashtable for easy column creation. See Examples for details</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Collections.Hashtable[]</command:parameterValue><dev:type><maml:name>System.Collections.Hashtable[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnObject</maml:name><maml:description><maml:para>If you want to get fancy, you can build your own column objects and pass them in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Column[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Column[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AnsiNullsStatus</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ChangeTrackingEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSourceName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Durability</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DurabilityType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DurabilityType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalTableDistribution</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExternalTableDistributionType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExternalTableDistributionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileFormatName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamFileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamPartitionScheme</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableDirectoryName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableNameColumnCollation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableNamespaceEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryTableName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryTableSchema</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsExternal</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFileTable</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsMemoryOptimized</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsSystemVersioned</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Location</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockEscalation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LockEscalationType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LockEscalationType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionScheme</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QuotedIdentifierStatus</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="22" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectSampleValue</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Double</command:parameterValue><dev:type><maml:name>Double</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="23" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectType</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExternalTableRejectType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExternalTableRejectType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="24" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectValue</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Double</command:parameterValue><dev:type><maml:name>Double</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="25" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveDataMigrationState</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.RemoteDataArchiveMigrationState</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.RemoteDataArchiveMigrationState</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="26" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveFilterPredicate</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="27" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteObjectName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="28" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteSchemaName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="29" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteTableName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteTableProvisioned</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="30" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShardingColumnName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="31" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TextFileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrackColumnsUpdatedEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="32" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetentionPeriod</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="33" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetentionPeriodUnit</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TemporalHistoryRetentionPeriodUnit</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TemporalHistoryRetentionPeriodUnit</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="34" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DwTableDistribution</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DwTableDistributionType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DwTableDistributionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="35" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectedRowLocation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlineHeapOperation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="36" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LowPriorityMaxDuration</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataConsistencyCheck</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="37" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LowPriorityAbortAfterWait</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AbortAfterWait</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AbortAfterWait</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="38" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNode</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsEdge</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsVarDecimalStorageFormatEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the table, just print the table script on the screen.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="39" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AnsiNullsStatus</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ChangeTrackingEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>Hashtable for easy column creation. See Examples for details</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Collections.Hashtable[]</command:parameterValue><dev:type><maml:name>System.Collections.Hashtable[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnObject</maml:name><maml:description><maml:para>If you want to get fancy, you can build your own column objects and pass them in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Column[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Column[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases where the table will be created</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataConsistencyCheck</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSourceName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Durability</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DurabilityType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DurabilityType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DwTableDistribution</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DwTableDistributionType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DwTableDistributionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalTableDistribution</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExternalTableDistributionType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExternalTableDistributionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileFormatName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamFileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamPartitionScheme</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableDirectoryName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableNameColumnCollation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileTableNamespaceEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetentionPeriod</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryRetentionPeriodUnit</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.TemporalHistoryRetentionPeriodUnit</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.TemporalHistoryRetentionPeriodUnit</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryTableName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HistoryTableSchema</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsEdge</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsExternal</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFileTable</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsMemoryOptimized</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNode</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsSystemVersioned</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsVarDecimalStorageFormatEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Location</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LockEscalation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LockEscalationType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LockEscalationType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LowPriorityAbortAfterWait</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AbortAfterWait</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AbortAfterWait</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LowPriorityMaxDuration</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the table</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnlineHeapOperation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PartitionScheme</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Passthru</maml:name><maml:description><maml:para>Don't create the table, just print the table script on the screen.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>QuotedIdentifierStatus</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectedRowLocation</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectSampleValue</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Double</command:parameterValue><dev:type><maml:name>Double</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectType</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExternalTableRejectType</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExternalTableRejectType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RejectValue</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Double</command:parameterValue><dev:type><maml:name>Double</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveDataMigrationState</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.RemoteDataArchiveMigrationState</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.RemoteDataArchiveMigrationState</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteDataArchiveFilterPredicate</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteObjectName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteSchemaName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteTableName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteTableProvisioned</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema for the table, defaults to dbo</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ShardingColumnName</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TextFileGroup</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrackColumnsUpdatedEnabled</maml:name><maml:description><maml:para>No information provided by Microsoft</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: table Author: Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $col = @{ </dev:code><dev:remarks><maml:para> >> Name = 'test' >> Type = 'varchar' >> MaxLength = 20 >> Nullable = $true >> } PS C:\> New-DbaDbTable -SqlInstance sql2017 -Database tempdb -Name testtable -ColumnMap $col Creates a new table on sql2017 in tempdb with the name testtable and one column </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cols = @( ) </dev:code><dev:remarks><maml:para> >> $cols += @{ >> Name = 'Id' >> Type = 'varchar' >> MaxLength = 36 >> DefaultExpression = 'NEWID()' >> } >> $cols += @{ >> Name = 'Since' >> Type = 'datetime2' >> DefaultString = '2021-12-31' >> } PS C:\> New-DbaDbTable -SqlInstance sql2017 -Database tempdb -Name testtable -ColumnMap $cols Creates a new table on sql2017 in tempdb with the name testtable and two columns. Uses "DefaultExpression" to interpret the value "NEWID()" as an expression regardless of the data type of the column. Uses "DefaultString" to interpret the value "2021-12-31" as a string regardless of the data type of the column. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> # Create collection </dev:code><dev:remarks><maml:para> >> $cols = @() >> # Add columns to collection >> $cols += @{ >> Name = 'testId' >> Type = 'int' >> Identity = $true >> } >> $cols += @{ >> Name = 'test' >> Type = 'varchar' >> MaxLength = 20 >> Nullable = $true >> } >> $cols += @{ >> Name = 'test2' >> Type = 'int' >> Nullable = $false >> } >> $cols += @{ >> Name = 'test3' >> Type = 'decimal' >> MaxLength = 9 >> Nullable = $true >> } >> $cols += @{ >> Name = 'test4' >> Type = 'decimal' >> Precision = 8 >> Scale = 2 >> Nullable = $false >> } >> $cols += @{ >> Name = 'test5' >> Type = 'Nvarchar' >> MaxLength = 50 >> Nullable = $false >> Default = 'Hello' >> DefaultName = 'DF_Name_test5' >> } >> $cols += @{ >> Name = 'test6' >> Type = 'int' >> Nullable = $false >> Default = '0' >> } >> $cols += @{ >> Name = 'test7' >> Type = 'smallint' >> Nullable = $false >> Default = 100 >> } >> $cols += @{ >> Name = 'test8' >> Type = 'Nchar' >> MaxLength = 3 >> Nullable = $false >> Default = 'ABC' >> } >> $cols += @{ >> Name = 'test9' >> Type = 'char' >> MaxLength = 4 >> Nullable = $false >> Default = 'XPTO' >> } >> $cols += @{ >> Name = 'test10' >> Type = 'datetime' >> Nullable = $false >> Default = 'GETDATE()' >> } PS C:\> New-DbaDbTable -SqlInstance sql2017 -Database tempdb -Name testtable -ColumnMap $cols Creates a new table on sql2017 in tempdb with the name testtable and ten columns. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbTransfer</command:name><command:noun>DbaDbTransfer</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a transfer object to clone objects from one database to another.</maml:para></maml:description></command:details><maml:description><maml:para>Returns an SMO Transfer object that controls the process of copying database objects from one database to another.</maml:para><maml:para>Does not perform any actions unless explicitly called with .TransferData() or piped into Invoke-DbaDbTransfer.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbTransfer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination Sql Server. You must have appropriate access to create objects on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the objects from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the objects to. If not specified, it is assumed to be same as the source database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the data copy defaults to 5000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Custom scripting rules, generated by New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of database SMO objects into the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.NamedSmoObject[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.NamedSmoObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAllObjects</maml:name><maml:description><maml:para>Transfer all objects of the source database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAll</maml:name><maml:description><maml:para>Object types to be transferred from a database. Allowed values: FullTextCatalogs FullTextStopLists SearchPropertyLists Tables Views StoredProcedures UserDefinedFunctions UserDefinedDataTypes UserDefinedTableTypes PlanGuides Rules Defaults Users Roles PartitionSchemes PartitionFunctions XmlSchemaCollections SqlAssemblies UserDefinedAggregates UserDefinedTypes Schemas Synonyms Sequences DatabaseTriggers DatabaseScopedCredentials ExternalFileFormats ExternalDataSources Logins ExternalLibraries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOnly</maml:name><maml:description><maml:para>Transfers only object schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataOnly</maml:name><maml:description><maml:para>Transfers only data without copying schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the data copy defaults to 5000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAll</maml:name><maml:description><maml:para>Object types to be transferred from a database. Allowed values: FullTextCatalogs FullTextStopLists SearchPropertyLists Tables Views StoredProcedures UserDefinedFunctions UserDefinedDataTypes UserDefinedTableTypes PlanGuides Rules Defaults Users Roles PartitionSchemes PartitionFunctions XmlSchemaCollections SqlAssemblies UserDefinedAggregates UserDefinedTypes Schemas Synonyms Sequences DatabaseTriggers DatabaseScopedCredentials ExternalFileFormats ExternalDataSources Logins ExternalLibraries</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyAllObjects</maml:name><maml:description><maml:para>Transfer all objects of the source database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database to copy the objects from.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataOnly</maml:name><maml:description><maml:para>Transfers only data without copying schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDatabase</maml:name><maml:description><maml:para>The database to copy the objects to. If not specified, it is assumed to be same as the source database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the source instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlInstance</maml:name><maml:description><maml:para>Destination Sql Server. You must have appropriate access to create objects on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping of database SMO objects into the command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.NamedSmoObject[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.NamedSmoObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOnly</maml:name><maml:description><maml:para>Transfers only object schema.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptingOption</maml:name><maml:description><maml:para>Custom scripting rules, generated by New-DbaScriptingOption</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ScriptingOptions</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ScriptingOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server instance name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Transfer</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Transfer, Object Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2020 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbTransfer -SqlInstance sql1 -Destination sql2 -Database mydb -CopyAll Tables </dev:code><dev:remarks><maml:para> Creates a transfer object that, when invoked, would copy all tables from database sql1.mydb to sql2.mydb </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance sql1 -Database MyDb -Table a, b, c | New-DbaDbTransfer -SqlInstance sql1 -Destination sql2 -Database mydb </dev:code><dev:remarks><maml:para> Creates a transfer object to copy specific tables from database sql1.mydb to sql2.mydb </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbTransfer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDbUser</command:name><command:noun>DbaDbUser</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new user for the specified database.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new user for a specified database with provided specifications.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDbUser</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server. By default, system databases are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystem</maml:name><maml:description><maml:para>If this switch is enabled, the user will be added to system databases. This switch will be ignored if -Database is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>When specified, the user will be associated to this SQL login and have the same name as the Login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Username</maml:name><maml:description><maml:para>When specified, the user will have this name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultSchema</maml:name><maml:description><maml:para>The default database schema for the user. If not specified this value will default to dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the user is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE USER [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If user exists, drop and recreate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultSchema</maml:name><maml:description><maml:para>The default database schema for the user. If not specified this value will default to dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server. By default, system databases are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the user is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE USER [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If user exists, drop and recreate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystem</maml:name><maml:description><maml:para>If this switch is enabled, the user will be added to system databases. This switch will be ignored if -Database is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>When specified, the user will be associated to this SQL login and have the same name as the Login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Username</maml:name><maml:description><maml:para>When specified, the user will have this name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, User Author: Frank Henninger (@osiris687) | Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Login user1 </dev:code><dev:remarks><maml:para> Creates a new sql user with login named user1 in the specified database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Username user1 </dev:code><dev:remarks><maml:para> Creates a new sql user without login named user1 in the specified database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Login Login1 -Username user1 </dev:code><dev:remarks><maml:para> Creates a new sql user named user1 mapped to Login1 in the specified database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Login Login1 -Username user1 -DefaultSchema schema1 </dev:code><dev:remarks><maml:para> Creates a new sql user named user1 mapped to Login1 in the specified database and specifies the default schema to be schema1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDbUser -SqlInstance sqlserver2014 -Database DB1 -Username "claudio@********.onmicrosoft.com" -ExternalProvider </dev:code><dev:remarks><maml:para> Creates a new sql user named 'claudio@********.onmicrosoft.com' mapped to Azure Active Directory (AAD) in the specified database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDbUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDiagnosticAdsNotebook</command:name><command:noun>DbaDiagnosticAdsNotebook</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new Diagnostic Jupyter Notebook for use with Azure Data Studio</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new Jupyter Notebook for use with Azure Data Studio, based on Glenn Berry's</maml:para><maml:para>popular Diagnostic queries</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDiagnosticAdsNotebook</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetVersion</maml:name><maml:description><maml:para>If you are not creating the notebook for a specific instance of SQL Server, you can specify the version that you want to create the notebook for. Must be one of "2005", "2008", "2008R2", "2012", "2014", "2016", "2016SP2", "2017", "2019", "2022", "AzureSQLDatabase"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the output path of the Jupyter Notebook</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDatabaseSpecific</maml:name><maml:description><maml:para>If this switch is enabled, the notebook will also include database-specific queries. Defaults to $false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeDatabaseSpecific</maml:name><maml:description><maml:para>If this switch is enabled, the notebook will also include database-specific queries. Defaults to $false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the output path of the Jupyter Notebook</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to the default instance on localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetVersion</maml:name><maml:description><maml:para>If you are not creating the notebook for a specific instance of SQL Server, you can specify the version that you want to create the notebook for. Must be one of "2005", "2008", "2008R2", "2012", "2014", "2016", "2016SP2", "2017", "2019", "2022", "AzureSQLDatabase"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, GlennBerry, Notebooks, AzureDataStudio Author: Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDiagnosticAdsNotebook -SqlInstance localhost -Path c:\temp\myNotebook.ipynb </dev:code><dev:remarks><maml:para> Creates a new Jupyter Notebook named "myNotebook" based on the version of diagnostic queries found at localhost </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDiagnosticAdsNotebook -TargetVersion 2016SP2 -Path c:\temp\myNotebook.ipynb </dev:code><dev:remarks><maml:para> Creates a new Jupyter Notebook named "myNotebook" based on the version "2016SP2" of diagnostic queries </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDiagnosticAdsNotebook -TargetVersion 2017 -Path c:\temp\myNotebook.ipynb -IncludeDatabaseSpecific </dev:code><dev:remarks><maml:para> Creates a new Jupyter Notebook named "myNotebook" based on the version "2017" of diagnostic queries, including database-specific queries </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDiagnosticAdsNotebook</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaDirectory</command:name><command:noun>DbaDirectory</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates new path as specified by the path variable</maml:para></maml:description></command:details><maml:description><maml:para>Uses master.dbo.xp_create_subdir to create the path</maml:para><maml:para>Returns $true if the path can be created, $false otherwise</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaDirectory</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path to tests. Can be a file or directory.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path to tests. Can be a file or directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Path, Directory, Folder Author: Stuart Moore Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: Admin access to server (not SQL Services), Remoting must be enabled and accessible if $SqlInstance is not local </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDirectory -SqlInstance sqlcluster -Path L:\MSAS12.MSSQLSERVER\OLAP </dev:code><dev:remarks><maml:para> If 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $credential = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\> New-DbaDirectory -SqlInstance sqlcluster -SqlCredential $credential -Path L:\MSAS12.MSSQLSERVER\OLAP If 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaDirectory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates endpoints on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Creates endpoints on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaEndpoint</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the endpoint. Defaults to hadr_endpoint if type is DatabaseMirroring, has to be provided for other types.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of endpoint. Defaults to DatabaseMirroring. Options: DatabaseMirroring, ServiceBroker, Soap, TSql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Protocol</maml:name><maml:description><maml:para>The type of protocol. Defaults to tcp. Options: Tcp, NamedPipes, Http, Via, SharedMemory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The type of role. Defaults to All. Options: All, None, Partner, Witness</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointEncryption</maml:name><maml:description><maml:para>Used to specify the state of encryption on the endpoint. Defaults to required. Disabled Required Supported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specifies an encryption algorithm used on an endpoint. Defaults to Aes. Options are: AesRC4 Aes None RC4 RC4Aes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Database certificate used for authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Specifies the IP address that the endpoint will listen on. The default is ALL. This means that the listener will accept a connection on any valid IP address. Currently only IPv4 is supported by this command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Ipaddress</command:parameterValue><dev:type><maml:name>Ipaddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Port for TCP. If one is not provided, it will be auto-generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SslPort</maml:name><maml:description><maml:para>Port for SSL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Owner of the endpoint. Defaults to sa.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>Database certificate used for authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>Specifies an encryption algorithm used on an endpoint. Defaults to Aes. Options are: AesRC4 Aes None RC4 RC4Aes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointEncryption</maml:name><maml:description><maml:para>Used to specify the state of encryption on the endpoint. Defaults to required. Disabled Required Supported</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IPAddress</maml:name><maml:description><maml:para>Specifies the IP address that the endpoint will listen on. The default is ALL. This means that the listener will accept a connection on any valid IP address. Currently only IPv4 is supported by this command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Ipaddress</command:parameterValue><dev:type><maml:name>Ipaddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the endpoint. Defaults to hadr_endpoint if type is DatabaseMirroring, has to be provided for other types.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Owner of the endpoint. Defaults to sa.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Port for TCP. If one is not provided, it will be auto-generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Protocol</maml:name><maml:description><maml:para>The type of protocol. Defaults to tcp. Options: Tcp, NamedPipes, Http, Via, SharedMemory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The type of role. Defaults to All. Options: All, None, Partner, Witness</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SslPort</maml:name><maml:description><maml:para>Port for SSL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of endpoint. Defaults to DatabaseMirroring. Options: DatabaseMirroring, ServiceBroker, Soap, TSql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring </dev:code><dev:remarks><maml:para> Creates a database mirroring endpoint on localhost\sql2017 which using the default port </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring -Port 5055 </dev:code><dev:remarks><maml:para> Creates a database mirroring endpoint on localhost\sql2017 which uses alternative port 5055 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaEndpoint -SqlInstance localhost\sql2017 -Type DatabaseMirroring -IPAddress 192.168.0.15 -Port 5055 </dev:code><dev:remarks><maml:para> Creates a database mirroring endpoint on localhost\sql2017 which binds only on ipaddress 192.168.0.15 and port 5055 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaFirewallRule</command:name><command:noun>DbaFirewallRule</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new inbound firewall rule for a SQL Server instance and adds the rule to the target computer.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new inbound firewall rule for a SQL Server instance and adds the rule to the target computer.</maml:para><maml:para>This is basically a wrapper around New-NetFirewallRule executed at the target computer.</maml:para><maml:para>So this only works if New-NetFirewallRule works on the target computer.</maml:para><maml:para>Both DisplayName and Name are set to the same value, since DisplayName is required</maml:para><maml:para>but only Name uniquely defines the rule, thus avoiding duplicate rules with different settings.</maml:para><maml:para>The names and the group for all rules are fixed to be able to get them back with Get-DbaFirewallRule.</maml:para><maml:para>The functionality is currently limited. Help to extend the functionality is welcome.</maml:para><maml:para>As long as you can read this note here, there may be breaking changes in future versions.</maml:para><maml:para>So please review your scripts using this command after updating dbatools.</maml:para><maml:para>The firewall rule for the instance itself will have the following configuration (parameters for New-NetFirewallRule):</maml:para><maml:para> DisplayName = 'SQL Server default instance' or 'SQL Server instance <InstanceName>'</maml:para><maml:para> Name = 'SQL Server default instance' or 'SQL Server instance <InstanceName>'</maml:para><maml:para> Group = 'SQL Server'</maml:para><maml:para> Enabled = 'True'</maml:para><maml:para> Direction = 'Inbound'</maml:para><maml:para> Protocol = 'TCP'</maml:para><maml:para> LocalPort = '<Port>' (for instances with static port)</maml:para><maml:para> Program = '<Path ending with MSSQL\Binn\sqlservr.exe>' (for instances with dynamic port)</maml:para><maml:para>The firewall rule for the SQL Server Browser will have the following configuration (parameters for New-NetFirewallRule):</maml:para><maml:para> DisplayName = 'SQL Server Browser'</maml:para><maml:para> Name = 'SQL Server Browser'</maml:para><maml:para> Group = 'SQL Server'</maml:para><maml:para> Enabled = 'True'</maml:para><maml:para> Direction = 'Inbound'</maml:para><maml:para> Protocol = 'UDP'</maml:para><maml:para> LocalPort = '1434'</maml:para><maml:para>The firewall rule for the dedicated admin connection (DAC) will have the following configuration (parameters for New-NetFirewallRule):</maml:para><maml:para> DisplayName = 'SQL Server default instance (DAC)' or 'SQL Server instance <InstanceName> (DAC)'</maml:para><maml:para> Name = 'SQL Server default instance (DAC)' or 'SQL Server instance <InstanceName> (DAC)'</maml:para><maml:para> Group = 'SQL Server'</maml:para><maml:para> Enabled = 'True'</maml:para><maml:para> Direction = 'Inbound'</maml:para><maml:para> Protocol = 'TCP'</maml:para><maml:para> LocalPort = '<Port>' (typically 1434 for a default instance, but will be fetched from ERRORLOG)</maml:para><maml:para>The firewall rule for the DAC will only be created if the DAC is configured for listening remotely.</maml:para><maml:para>Use `Set-DbaSpConfigure -SqlInstance SRV1 -Name RemoteDacConnectionsEnabled -Value 1` to enable remote DAC before running this command.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaFirewallRule</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Creates firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) If this parameter is not used: * The firewall rule for the SQL Server instance will be created. * In case the instance is listening on a port other than 1433, also the firewall rule for the SQL Server Browser will be created if not already in place. * In case the DAC is configured for listening remotely, also the firewall rule for the DAC will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration parameters that are used when calling New-NetFirewallRule. These will override the default settings. Parameters Name, DisplayName and Group are not allowed here and will be silently ignored. https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the rule to be created already exists, a warning is displayed. If this switch is enabled, the rule will be deleted and created again.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Configuration</maml:name><maml:description><maml:para>A hashtable with custom configuration parameters that are used when calling New-NetFirewallRule. These will override the default settings. Parameters Name, DisplayName and Group are not allowed here and will be silently ignored. https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the rule to be created already exists, a warning is displayed. If this switch is enabled, the rule will be deleted and created again.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Creates firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) If this parameter is not used: * The firewall rule for the SQL Server instance will be created. * In case the instance is listening on a port other than 1433, also the firewall rule for the SQL Server Browser will be created if not already in place. * In case the DAC is configured for listening remotely, also the firewall rule for the DAC will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, Firewall Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaFirewallRule -SqlInstance SRV1, SRV1\TEST </dev:code><dev:remarks><maml:para> Automatically configures the needed firewall rules for both the default instance and the instance named TEST on SRV1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaFirewallRule -SqlInstance SRV1, SRV1\TEST -Configuration @{ Profile = 'Domain' } </dev:code><dev:remarks><maml:para> Automatically configures the needed firewall rules for both the default instance and the instance named TEST on SRV1, but configures the firewall rule for the domain profile only. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaFirewallRule -SqlInstance SRV1\TEST -Type Engine -Force -Confirm:$false </dev:code><dev:remarks><maml:para> Creates or recreates the firewall rule for the instance TEST on SRV1. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaFirewallRule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaLinkedServer</command:name><command:noun>DbaLinkedServer</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new linked server.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new linked server. See the Microsoft documentation for sp_addlinkedserver for more details on the parameters.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaLinkedServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name of the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerProduct</maml:name><maml:description><maml:para>The product name of the data source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>The unique ID of the provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSource</maml:name><maml:description><maml:para>The name of the data source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Location</maml:name><maml:description><maml:para>The location of the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProviderString</maml:name><maml:description><maml:para>The provider connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Catalog</maml:name><maml:description><maml:para>The catalog or default database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContext</maml:name><maml:description><maml:para>Specifies the security context option found on the SSMS Security tab of the linked server. This is a separate configuration from the mapping of a local login to a remote login. It specifies the connection behavior for a login that is not explicitly mapped. 'NoConnection' means that a connection will not be made. 'WithoutSecurityContext' means the connection will be made without using a security context. 'CurrentSecurityContext' means the connection will be made using the login's current security context. 'SpecifiedSecurityContext' means the specified username and password will be used. The default value is 'WithoutSecurityContext'. For more details see the Microsoft documentation for sp_addlinkedsrvlogin and also review the SSMS Security tab of the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContextRemoteUser</maml:name><maml:description><maml:para>Specifies the remote login name. This param is used when SecurityContext is set to SpecifiedSecurityContext. To map a local login to a remote login use New-DbaLinkedServerLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContextRemoteUserPassword</maml:name><maml:description><maml:para>Specifies the remote login password. This param is used when SecurityContext is set to SpecifiedSecurityContext. To map a local login to a remote login use New-DbaLinkedServerLogin. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Catalog</maml:name><maml:description><maml:para>The catalog or default database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataSource</maml:name><maml:description><maml:para>The name of the data source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name of the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Location</maml:name><maml:description><maml:para>The location of the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>The unique ID of the provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProviderString</maml:name><maml:description><maml:para>The provider connection string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContext</maml:name><maml:description><maml:para>Specifies the security context option found on the SSMS Security tab of the linked server. This is a separate configuration from the mapping of a local login to a remote login. It specifies the connection behavior for a login that is not explicitly mapped. 'NoConnection' means that a connection will not be made. 'WithoutSecurityContext' means the connection will be made without using a security context. 'CurrentSecurityContext' means the connection will be made using the login's current security context. 'SpecifiedSecurityContext' means the specified username and password will be used. The default value is 'WithoutSecurityContext'. For more details see the Microsoft documentation for sp_addlinkedsrvlogin and also review the SSMS Security tab of the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContextRemoteUser</maml:name><maml:description><maml:para>Specifies the remote login name. This param is used when SecurityContext is set to SpecifiedSecurityContext. To map a local login to a remote login use New-DbaLinkedServerLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurityContextRemoteUserPassword</maml:name><maml:description><maml:para>Specifies the remote login password. This param is used when SecurityContext is set to SpecifiedSecurityContext. To map a local login to a remote login use New-DbaLinkedServerLogin. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerProduct</maml:name><maml:description><maml:para>The product name of the data source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer, Server Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 -ServerProduct mssql -Provider sqlncli -DataSource sql02 </dev:code><dev:remarks><maml:para> Creates a new linked server named linkedServer1 on the sql01 instance. The link is via the SQL Native Client and is connected to the sql02 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Connect-DbaInstance -SqlInstance sql01 | New-DbaLinkedServer -LinkedServer linkedServer1 -ServerProduct mssql -Provider sqlncli -DataSource sql02 </dev:code><dev:remarks><maml:para> Creates a new linked server named linkedServer1 on the sql01 instance. The link is via the SQL Native Client and is connected to the sql02 instance. The sql01 instance is passed in via pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 -ServerProduct mssql -Provider sqlncli -DataSource sql02 -SecurityContext CurrentSecurityContext </dev:code><dev:remarks><maml:para> Creates a new linked server named linkedServer1 on the sql01 instance. The link is via the SQL Native Client and is connected to the sql02 instance. Connections with logins that are not explicitly mapped to the remote server will use the current login's security context. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaLinkedServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaLinkedServerLogin</command:name><command:noun>DbaLinkedServerLogin</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new linked server login.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new linked server login. See the Microsoft documentation for sp_addlinkedsrvlogin for more details on the parameters.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaLinkedServerLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>Specifies the local login name. This parameter is required in all scenarios.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteUser</maml:name><maml:description><maml:para>Specifies the remote login name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteUserPassword</maml:name><maml:description><maml:para>Specifies the remote login password as a secure string. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using this parameter. View the documentation for sp_addlinkedsrvlogin for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Impersonate</maml:name><maml:description><maml:para>Specifies if the local login credentials should be used instead of the remote login credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaLinkedServer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LinkedServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LinkedServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Impersonate</maml:name><maml:description><maml:para>Specifies if the local login credentials should be used instead of the remote login credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaLinkedServer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.LinkedServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.LinkedServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>Specifies the local login name. This parameter is required in all scenarios.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteUser</maml:name><maml:description><maml:para>Specifies the remote login name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoteUserPassword</maml:name><maml:description><maml:para>Specifies the remote login password as a secure string. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using this parameter. View the documentation for sp_addlinkedsrvlogin for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer, Server Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin localUser1 -RemoteUser remoteUser1 -RemoteUserPassword <password> </dev:code><dev:remarks><maml:para> Creates a new linked server login and maps the local login testuser1 to the remote login testuser2. This linked server login is created on the sql01 instance for the linkedServer1 linked server. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using the command with the RemoteUserPassword parameter. View the documentation for sp_addlinkedsrvlogin for more details. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -Impersonate </dev:code><dev:remarks><maml:para> Creates a mapping for all local logins on sql01 to connect using their own credentials to the linked server linkedServer1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 | New-DbaLinkedServerLogin -LinkedServer linkedServer1 -LocalLogin testuser1 -RemoteUser testuser2 -RemoteUserPassword <password> </dev:code><dev:remarks><maml:para> Creates a new linked server login and maps the local login testuser1 to the remote login testuser2. This linked server login is created on the sql01 instance for the linkedServer1 linked server. The linkedServer1 instance is passed in via pipeline. NOTE: passwords are sent to the SQL Server instance in plain text. Check with your security administrator before using the command with the RemoteUserPassword parameter. View the documentation for sp_addlinkedsrvlogin for more details. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaLinkedServerLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new SQL Server login</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new SQL Server login with provided specifications</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaLogin</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login name(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to change login names when piping objects into the procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to authenticate the Login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCredential</maml:name><maml:description><maml:para>Map the login to a credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sid</maml:name><maml:description><maml:para>Provide an explicit Sid that should be used when creating the account. Can be [byte[]] or hex [string] ('0xFFFF...')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>Default database for the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Login's default language</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordExpirationEnabled</maml:name><maml:description><maml:para>Enforces password expiration policy. Requires PasswordPolicyEnforced to be enabled. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Enforces password complexity policy. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordMustChange</maml:name><maml:description><maml:para>Enforces user must change password at next login. When specified will enforce PasswordExpirationEnabled and PasswordPolicyEnforced as they are required for the must change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the login in a disabled state</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyWindowsLogin</maml:name><maml:description><maml:para>Create the login and deny Windows login ability</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the piped login object to generate new sids on the server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the login is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE LOGIN [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If login exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaLogin</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login name(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to change login names when piping objects into the procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToAsymmetricKey</maml:name><maml:description><maml:para>Map the login to an asymmetric key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCredential</maml:name><maml:description><maml:para>Map the login to a credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sid</maml:name><maml:description><maml:para>Provide an explicit Sid that should be used when creating the account. Can be [byte[]] or hex [string] ('0xFFFF...')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the login in a disabled state</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyWindowsLogin</maml:name><maml:description><maml:para>Create the login and deny Windows login ability</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the piped login object to generate new sids on the server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the login is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE LOGIN [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If login exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaLogin</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login name(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to change login names when piping objects into the procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCertificate</maml:name><maml:description><maml:para>Map the login to a certificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCredential</maml:name><maml:description><maml:para>Map the login to a credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sid</maml:name><maml:description><maml:para>Provide an explicit Sid that should be used when creating the account. Can be [byte[]] or hex [string] ('0xFFFF...')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the login in a disabled state</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyWindowsLogin</maml:name><maml:description><maml:para>Create the login and deny Windows login ability</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the piped login object to generate new sids on the server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the login is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE LOGIN [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If login exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaLogin</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login name(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to change login names when piping objects into the procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HashedPassword</maml:name><maml:description><maml:para>Hashed password string used to authenticate the Login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCredential</maml:name><maml:description><maml:para>Map the login to a credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sid</maml:name><maml:description><maml:para>Provide an explicit Sid that should be used when creating the account. Can be [byte[]] or hex [string] ('0xFFFF...')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>Default database for the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Login's default language</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordExpirationEnabled</maml:name><maml:description><maml:para>Enforces password expiration policy. Requires PasswordPolicyEnforced to be enabled. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Enforces password complexity policy. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the login in a disabled state</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyWindowsLogin</maml:name><maml:description><maml:para>Create the login and deny Windows login ability</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the piped login object to generate new sids on the server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the login is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE LOGIN [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If login exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>Default database for the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyWindowsLogin</maml:name><maml:description><maml:para>Create the login and deny Windows login ability</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Create the login in a disabled state</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExternalProvider</maml:name><maml:description><maml:para>Specifies that the login is for Azure AD Authentication. Equivalent to T-SQL: 'CREATE LOGIN [claudio@********.onmicrosoft.com] FROM EXTERNAL PROVIDER`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If login exists, drop and recreate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HashedPassword</maml:name><maml:description><maml:para>Hashed password string used to authenticate the Login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the parameters required from a Login object that has been piped into the command</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Login's default language</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login name(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to change login names when piping objects into the procedure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToAsymmetricKey</maml:name><maml:description><maml:para>Map the login to an asymmetric key</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCertificate</maml:name><maml:description><maml:para>Map the login to a certificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MapToCredential</maml:name><maml:description><maml:para>Map the login to a credential</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewSid</maml:name><maml:description><maml:para>Ignore sids from the piped login object to generate new sids on the server. Useful when copying login onto the same server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordExpirationEnabled</maml:name><maml:description><maml:para>Enforces password expiration policy. Requires PasswordPolicyEnforced to be enabled. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordMustChange</maml:name><maml:description><maml:para>Enforces user must change password at next login. When specified will enforce PasswordExpirationEnabled and PasswordPolicyEnforced as they are required for the must change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Enforces password complexity policy. Can be $true or $false(default)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to authenticate the Login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sid</maml:name><maml:description><maml:para>Provide an explicit Sid that should be used when creating the account. Can be [byte[]] or hex [string] ('0xFFFF...')</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLogin -SqlInstance Server1,Server2 -Login Newlogin </dev:code><dev:remarks><maml:para> You 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $securePassword = Read-Host "Input password" -AsSecureString </dev:code><dev:remarks><maml:para> PS C:\> New-DbaLogin -SqlInstance Server1\sql1 -Login Newlogin -SecurePassword $securePassword -PasswordPolicyEnforced -PasswordExpirationEnabled Creates a login on Server1\sql1 with a predefined password. The login will have password and expiration policies enforced onto it. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql1 -Login Oldlogin | New-DbaLogin -SqlInstance sql1 -LoginRenameHashtable @{Oldlogin = 'Newlogin'} -Force -NewSid -Disabled:$false </dev:code><dev:remarks><maml:para> Copies 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 [Newlogin] will be removed prior to creation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql1 -Login Login1,Login2 | New-DbaLogin -SqlInstance sql2 -PasswordPolicyEnforced -PasswordExpirationEnabled -DefaultDatabase tempdb -Disabled </dev:code><dev:remarks><maml:para> Copies 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] and will be created in a disabled state. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLogin -SqlInstance sql1 -Login domain\user </dev:code><dev:remarks><maml:para> Creates a new Windows Authentication backed login on sql1. The login will be part of the public server role. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLogin -SqlInstance sql1 -Login domain\user1, domain\user2 -DenyWindowsLogin </dev:code><dev:remarks><maml:para> Creates two new Windows Authentication backed login on sql1. The logins would be denied from logging in. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaLogin -SqlInstance sql1 -Login "claudio@********.onmicrosoft.com" -ExternalProvider </dev:code><dev:remarks><maml:para> Creates a new login named 'claudio@********.onmicrosoft.com' mapped to Azure Active Directory (AAD). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaRgResourcePool</command:name><command:noun>DbaRgResourcePool</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a resource pool for use by the Resource Governor on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a resource pool for use by the Resource Governor on the specified SQL Server.</maml:para><maml:para>A resource pool represents a subset of the physical resources (memory, CPUs and IO) of an instance of the Database Engine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaRgResourcePool</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the resource pool already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaRgResourcePool</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the resource pool already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-DbaRgResourcePool</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumProcesses</maml:name><maml:description><maml:para>Specifies the maximum number of processes allowed for the external resource pool. Specify 0 to set an unlimited threshold for the pool, which is thereafter bound only by computer resources.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the resource pool already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the resource pool already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumProcesses</maml:name><maml:description><maml:para>Specifies the maximum number of processes allowed for the external resource pool. Specify 0 to set an unlimited threshold for the pool, which is thereafter bound only by computer resources.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourcePool, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaRgResourcePool -SqlInstance sql2016 -ResourcePool "poolAdmin" </dev:code><dev:remarks><maml:para> Creates a new resource pool named "poolAdmin" for the instance sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaRgResourcePool -SqlInstance sql2012\dev1 -ResourcePool "poolDeveloper" -SkipReconfigure </dev:code><dev:remarks><maml:para> Creates a new resource pool named "poolDeveloper" for the instance dev1 on sq2012. Reconfiguration is skipped and the Resource Governor will not be able to use the new resource pool until it is reconfigured. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaRgResourcePool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaRgWorkloadGroup</command:name><command:noun>DbaRgWorkloadGroup</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a Resource Governor workload group and associates the workload group with a Resource Governor resource pool.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a Resource Governor workload group and associates the workload group with a Resource Governor resource pool.</maml:para><maml:para>A workload group represents a subset of the resources of a resource pool in instance of the Database Engine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaRgWorkloadGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to create the workload group in. If not provided, set to the Default Resource Pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal (default) or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Importance</maml:name><maml:description><maml:para>Specifies the relative importance of a request in the workload group. Default is MEDIUM, allowed: LOW, MEDIUM, HIGH</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumMemoryGrantPercentage</maml:name><maml:description><maml:para>Specifies the maximum amount of memory that a single request can take from the pool. Default is 25%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumCpuTimeInSeconds</maml:name><maml:description><maml:para>Specifies the maximum amount of CPU time, in seconds, that a request can use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMemoryGrantTimeoutInSeconds</maml:name><maml:description><maml:para>Specifies the maximum time, in seconds, that a query can wait for a memory grant (work buffer memory) to become available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GroupMaximumRequests</maml:name><maml:description><maml:para>Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the workload group already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If the workload group already exists, drop and re-create it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GroupMaximumRequests</maml:name><maml:description><maml:para>Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Importance</maml:name><maml:description><maml:para>Specifies the relative importance of a request in the workload group. Default is MEDIUM, allowed: LOW, MEDIUM, HIGH</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumCpuTimeInSeconds</maml:name><maml:description><maml:para>Specifies the maximum amount of CPU time, in seconds, that a request can use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumMemoryGrantPercentage</maml:name><maml:description><maml:para>Specifies the maximum amount of memory that a single request can take from the pool. Default is 25%.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMemoryGrantTimeoutInSeconds</maml:name><maml:description><maml:para>Specifies the maximum time, in seconds, that a query can wait for a memory grant (work buffer memory) to become available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to create the workload group in. If not provided, set to the Default Resource Pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal (default) or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WorkloadGroup, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaRgWorkloadGroup -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -ResourcePool "poolAdmin" </dev:code><dev:remarks><maml:para> Creates a workload group "groupAdmin" in the resource pool named "poolAdmin" for the instance sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaRgWorkloadGroup -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -Force </dev:code><dev:remarks><maml:para> If "groupAdmin" exists, it is dropped and re-created in the default resource pool for the instance sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaRgWorkloadGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaScriptingOption</command:name><command:noun>DbaScriptingOption</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new Microsoft.SqlServer.Management.Smo.ScriptingOptions object</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new Microsoft.SqlServer.Management.Smo.ScriptingOptions object. Basically saves you the time from remembering the SMO assembly name ;)</maml:para><maml:para>See https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.scriptingoptions.aspx for more information</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaScriptingOption</maml:name></command:syntaxItem></command:syntax><command:parameters></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Script, Object Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\> $options.ScriptDrops = $false PS C:\> $options.WithDependencies = $false PS C:\> $options.AgentAlertJob = $true PS C:\> $options.AgentNotify = $true PS C:\> Get-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript -ScriptingOptionObject $options Exports Agent Jobs with the Scripting Options ScriptDrops/WithDependencies set to $false and AgentAlertJob/AgentNotify set to true </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaScriptingOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaServerRole</command:name><command:noun>DbaServerRole</command:noun><command:verb>New</command:verb><maml:description><maml:para>Create new server-level roles.</maml:para></maml:description></command:details><maml:description><maml:para>The New-DbaServerRole create new roles on instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaServerRole</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the role. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the role. If not specified will assume the default dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>Server-Level role to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role Author: Claudio Silva (@ClaudioESSilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaServerRole -SqlInstance sql2017a -ServerRole 'dbExecuter' -Owner sa </dev:code><dev:remarks><maml:para> Will create a new server role named dbExecuter and grant ownership to the login sa on sql2017a instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaServerRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaServiceMasterKey</command:name><command:noun>DbaServiceMasterKey</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new service master key.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new service master key in the master database.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaServiceMasterKey</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Enables easy creation of a secure password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to create the key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Enables easy creation of a secure password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>Secure string used to create the key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaServiceMasterKey -SqlInstance Server1 </dev:code><dev:remarks><maml:para> You will be prompted to securely enter your Service Key password, then a master key will be created in the master database on server1 if it does not exist. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaServiceMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaSqlParameter</command:name><command:noun>DbaSqlParameter</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new SQL parameter.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new SQL parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaSqlParameter</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompareInfo</maml:name><maml:description><maml:para>Sets the CompareInfo object that defines how string comparisons should be performed for this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DbType</maml:name><maml:description><maml:para>Sets the SqlDbType of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Direction</maml:name><maml:description><maml:para>Sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ForceColumnEncryption</maml:name><maml:description><maml:para>Enforces encryption of a parameter when using Always Encrypted. If SQL Server informs the driver that the parameter does not need to be encrypted, the query using the parameter will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing incorrect encryption metadata to the client, which may lead to data disclosure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNullable</maml:name><maml:description><maml:para>Sets a value that indicates whether the parameter accepts null values. IsNullable is not used to validate the parameter's value and will not prevent sending or receiving a null value when executing a command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocaleId</maml:name><maml:description><maml:para>Sets the locale identifier that determines conventions and language for a particular region.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offset</maml:name><maml:description><maml:para>Sets the offset to the Value property.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ParameterName</maml:name><maml:description><maml:para>Sets the name of the SqlParameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Precision</maml:name><maml:description><maml:para>Sets the maximum number of digits used to represent the Value property.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scale</maml:name><maml:description><maml:para>Sets the number of decimal places to which Value is resolved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Size</maml:name><maml:description><maml:para>Sets the maximum size, in bytes, of the data within the column.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceColumn</maml:name><maml:description><maml:para>Sets the name of the source column mapped to the DataSet and used for loading or returning the Value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceColumnNullMapping</maml:name><maml:description><maml:para>Sets a value which indicates whether the source column is nullable. This allows SqlCommandBuilder to correctly generate Update statements for nullable columns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceVersion</maml:name><maml:description><maml:para>Sets the DataRowVersion to use when you load Value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlDbType</maml:name><maml:description><maml:para>Sets the SqlDbType of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlValue</maml:name><maml:description><maml:para>Sets the value of the parameter as an SQL type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Sets the type name for a table-valued parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UdtTypeName</maml:name><maml:description><maml:para>Sets a string that represents a user-defined type as a parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>Sets the value of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompareInfo</maml:name><maml:description><maml:para>Sets the CompareInfo object that defines how string comparisons should be performed for this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DbType</maml:name><maml:description><maml:para>Sets the SqlDbType of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Direction</maml:name><maml:description><maml:para>Sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ForceColumnEncryption</maml:name><maml:description><maml:para>Enforces encryption of a parameter when using Always Encrypted. If SQL Server informs the driver that the parameter does not need to be encrypted, the query using the parameter will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing incorrect encryption metadata to the client, which may lead to data disclosure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsNullable</maml:name><maml:description><maml:para>Sets a value that indicates whether the parameter accepts null values. IsNullable is not used to validate the parameter's value and will not prevent sending or receiving a null value when executing a command.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocaleId</maml:name><maml:description><maml:para>Sets the locale identifier that determines conventions and language for a particular region.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offset</maml:name><maml:description><maml:para>Sets the offset to the Value property.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ParameterName</maml:name><maml:description><maml:para>Sets the name of the SqlParameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Precision</maml:name><maml:description><maml:para>Sets the maximum number of digits used to represent the Value property.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scale</maml:name><maml:description><maml:para>Sets the number of decimal places to which Value is resolved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Size</maml:name><maml:description><maml:para>Sets the maximum size, in bytes, of the data within the column.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceColumn</maml:name><maml:description><maml:para>Sets the name of the source column mapped to the DataSet and used for loading or returning the Value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceColumnNullMapping</maml:name><maml:description><maml:para>Sets a value which indicates whether the source column is nullable. This allows SqlCommandBuilder to correctly generate Update statements for nullable columns.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceVersion</maml:name><maml:description><maml:para>Sets the DataRowVersion to use when you load Value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlDbType</maml:name><maml:description><maml:para>Sets the SqlDbType of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlValue</maml:name><maml:description><maml:para>Sets the value of the parameter as an SQL type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TypeName</maml:name><maml:description><maml:para>Sets the type name for a table-valued parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UdtTypeName</maml:name><maml:description><maml:para>Sets a string that represents a user-defined type as a parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>Sets the value of the parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Utility, Query Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output </dev:code><dev:remarks><maml:para> Creates a SqlParameter object that can be used with Invoke-DbaQuery </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $output = New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output </dev:code><dev:remarks><maml:para> PS C:\> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $output PS C:\> $output.Value Creates an output parameter and uses it to invoke a stored procedure. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaSqlParameter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbatoolsSupportPackage</command:name><command:noun>DbatoolsSupportPackage</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a package of troubleshooting information that can be used by dbatools to help debug issues.</maml:para></maml:description></command:details><maml:description><maml:para>This function creates an extensive debugging package that can help with reproducing and fixing issues.</maml:para><maml:para>The file will be created on the desktop (or in the home directory if $home/Desktop does not exist) by default and will contain quite a bit of information:</maml:para><maml:para>- OS Information</maml:para><maml:para>- Hardware Information (CPU, Ram, things like that)</maml:para><maml:para>- .NET Information</maml:para><maml:para>- PowerShell Information</maml:para><maml:para>- Your input history</maml:para><maml:para>- The In-Memory message log</maml:para><maml:para>- The In-Memory error log</maml:para><maml:para>- Screenshot of the console buffer (Basically, everything written in your current console, even if you have to scroll upwards to see it.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbatoolsSupportPackage</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The folder where to place the output xml in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Variables</maml:name><maml:description><maml:para>Name of additional variables to attach. This allows you to add the content of variables to the support package, if you believe them to be relevant to the case.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Returns file object that was created during execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PassThru</maml:name><maml:description><maml:para>Returns file object that was created during execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The folder where to place the output xml in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Variables</maml:name><maml:description><maml:para>Name of additional variables to attach. This allows you to add the content of variables to the support package, if you believe them to be relevant to the case.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Support Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbatoolsSupportPackage </dev:code><dev:remarks><maml:para> Creates a large support pack in order to help us troubleshoot stuff. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbatoolsSupportPackage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>New</command:verb><maml:description><maml:para>Creates a new XESession object - for the dogged.</maml:para></maml:description></command:details><maml:description><maml:para>Creates a new XESession object - for the dogged (very manual, Import-DbaXESessionTemplate is recommended). See the following for more info:</maml:para><maml:para>https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/use-the-powershell-provider-for-extended-events</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESession</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Name of the session to be created.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The Name of the session to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $session = New-DbaXESession -SqlInstance sql2017 -Name XeSession_Test </dev:code><dev:remarks><maml:para> PS C:\> $event = $session.AddEvent("sqlserver.file_written") PS C:\> $event.AddAction("package0.callstack") PS C:\> $session.Create() Returns a new XE Session object from sql2017 then adds an event, an action then creates it. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESmartCsvWriter</command:name><command:noun>DbaXESmartCsvWriter</command:noun><command:verb>New</command:verb><maml:description><maml:para>This response type is used to write Extended Events to a CSV file.</maml:para></maml:description></command:details><maml:description><maml:para>This response type is used to write Extended Events to a CSV file.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESmartCsvWriter</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFile</maml:name><maml:description><maml:para>Specifies the path to the output CSV file.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Overwrite</maml:name><maml:description><maml:para>Specifies whether any existiting file should be overwritten or not.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Specifies a list of events to be processed (with others being ignored. By default, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumn</maml:name><maml:description><maml:para>Specifies the list of columns to output from the events. XESmartTarget will capture in memory and write to the target table only the columns (fields or targets) that are present in this list. Fields and actions are matched in a case-sensitive manner. Expression columns are supported. Specify a column with ColumnName AS Expression to add an expression column (Example: Total AS Reads + Writes)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Specifies a list of events to be processed (with others being ignored. By default, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumn</maml:name><maml:description><maml:para>Specifies the list of columns to output from the events. XESmartTarget will capture in memory and write to the target table only the columns (fields or targets) that are present in this list. Fields and actions are matched in a case-sensitive manner. Expression columns are supported. Specify a column with ColumnName AS Expression to add an expression column (Example: Total AS Reads + Writes)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFile</maml:name><maml:description><maml:para>Specifies the path to the output CSV file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Overwrite</maml:name><maml:description><maml:para>Specifies whether any existiting file should be overwritten or not.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $columns = "cpu_time", "duration", "physical_reads", "logical_reads", "writes", "row_count" </dev:code><dev:remarks><maml:para> PS C:\> $response = New-DbaXESmartCsvWriter -OutputFile c:\temp\workload.csv -OutputColumn $columns -OverWrite -Event "sql_batch_completed" PS C:\> Start-DbaXESmartTarget -SqlInstance localhost\sql2017 -Session "Profiler Standard" -Responder $response Writes Extended Events to the file "C:\temp\workload.csv". </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESmartCsvWriter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESmartEmail</command:name><command:noun>DbaXESmartEmail</command:noun><command:verb>New</command:verb><maml:description><maml:para>This response type can be used to send an email each time an event is captured.</maml:para></maml:description></command:details><maml:description><maml:para>This response type can be used to send an email each time an event is captured.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESmartEmail</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SmtpServer</maml:name><maml:description><maml:para>Address of the SMTP server for outgoing mail.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sender</maml:name><maml:description><maml:para>Sender's email address.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>To</maml:name><maml:description><maml:para>Address of the To recipient(s).</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cc</maml:name><maml:description><maml:para>Address of the Cc recipient(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Bcc</maml:name><maml:description><maml:para>Address of the Bcc recipient(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object containing username and password used to authenticate on the SMTP server. When blank, no authentication is performed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Subject of the mail message. Accepts placeholders in the text. Placeholders are in the form {PropertyName}, where PropertyName is one of the fields or actions available in the Event object. For instance, a valid Subject in a configuration file looks like this: "An event of name {Name} occurred at {collection_time}"</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Body</maml:name><maml:description><maml:para>Body of the mail message. The body can be static text or any property taken from the underlying event. See Subject for a description of how placeholders work.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Attachment</maml:name><maml:description><maml:para>Data to attach to the email message. At this time, it can be any of the fields/actions of the underlying event. The data from the field/action is attached to the message as an ASCII stream. A single attachment is supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AttachmentFileName</maml:name><maml:description><maml:para>File name to assign to the attachment.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PlainText</maml:name><maml:description><maml:para>If this switch is enabled, the email will be sent in plain text. By default, HTML formatting is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>You can specify a filter expression by using this attribute. The filter expression is in the same form that you would use in a SQL query. For example, a valid example looks like this: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Attachment</maml:name><maml:description><maml:para>Data to attach to the email message. At this time, it can be any of the fields/actions of the underlying event. The data from the field/action is attached to the message as an ASCII stream. A single attachment is supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AttachmentFileName</maml:name><maml:description><maml:para>File name to assign to the attachment.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Bcc</maml:name><maml:description><maml:para>Address of the Bcc recipient(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Body</maml:name><maml:description><maml:para>Body of the mail message. The body can be static text or any property taken from the underlying event. See Subject for a description of how placeholders work.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cc</maml:name><maml:description><maml:para>Address of the Cc recipient(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object containing username and password used to authenticate on the SMTP server. When blank, no authentication is performed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>You can specify a filter expression by using this attribute. The filter expression is in the same form that you would use in a SQL query. For example, a valid example looks like this: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PlainText</maml:name><maml:description><maml:para>If this switch is enabled, the email will be sent in plain text. By default, HTML formatting is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sender</maml:name><maml:description><maml:para>Sender's email address.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SmtpServer</maml:name><maml:description><maml:para>Address of the SMTP server for outgoing mail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subject</maml:name><maml:description><maml:para>Subject of the mail message. Accepts placeholders in the text. Placeholders are in the form {PropertyName}, where PropertyName is one of the fields or actions available in the Event object. For instance, a valid Subject in a configuration file looks like this: "An event of name {Name} occurred at {collection_time}"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>To</maml:name><maml:description><maml:para>Address of the To recipient(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> SmtpServer = "smtp.ad.local" >> To = "admin@ad.local" >> Sender = "reports@ad.local" >> Subject = "Query executed" >> Body = "Query executed at {collection_time}" >> Attachment = "batch_text" >> AttachmentFileName = "query.sql" >> } >> PS C:\> $emailresponse = New-DbaXESmartEmail @params PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session querytracker -Responder $emailresponse Sends an email each time a querytracker event is captured. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESmartEmail</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESmartQueryExec</command:name><command:noun>DbaXESmartQueryExec</command:noun><command:verb>New</command:verb><maml:description><maml:para>This response type executes a T-SQL command against a target database whenever an event is recorded.</maml:para></maml:description></command:details><maml:description><maml:para>This response type executes a T-SQL command against a target database whenever an event is recorded.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESmartQueryExec</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>The T-SQL command to execute. This string can contain placeholders for properties taken from the events. Placeholders are in the form {PropertyName}, where PropertyName is one of the fields or actions available in the Event object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>You can specify a filter expression by using this attribute. The filter expression is in the same form that you would use in a SQL query. For example, a valid example looks like this: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>You can specify a filter expression by using this attribute. The filter expression is in the same form that you would use in a SQL query. For example, a valid example looks like this: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>The T-SQL command to execute. This string can contain placeholders for properties taken from the events. Placeholders are in the form {PropertyName}, where PropertyName is one of the fields or actions available in the Event object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query "update table set whatever = 1" </dev:code><dev:remarks><maml:para> PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response Executes a T-SQL command against dbadb on sql2017 whenever a deadlock event is recorded. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESmartQueryExec</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESmartReplay</command:name><command:noun>DbaXESmartReplay</command:noun><command:verb>New</command:verb><maml:description><maml:para>This response type can be used to replay execution related events to a target SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESmartReplay</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Name of the initial catalog to connect to. Statements will be replayed by changing database to the same database where the event was originally captured, so this property only controls the initial database to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DelaySeconds</maml:name><maml:description><maml:para>Specifies the duration of the delay in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopOnError</maml:name><maml:description><maml:para>If this switch is enabled, the replay will be stopped when the first error is encountered. By default, error messages are piped to the log and console output, and replay proceeds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplayIntervalSeconds</maml:name><maml:description><maml:para>Specifies the duration of the replay interval in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Name of the initial catalog to connect to. Statements will be replayed by changing database to the same database where the event was originally captured, so this property only controls the initial database to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DelaySeconds</maml:name><maml:description><maml:para>Specifies the duration of the delay in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Each Response can be limited to processing specific events, while ignoring all the other ones. When this attribute is omitted, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplayIntervalSeconds</maml:name><maml:description><maml:para>Specifies the duration of the replay interval in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopOnError</maml:name><maml:description><maml:para>If this switch is enabled, the replay will be stopped when the first error is encountered. By default, error messages are piped to the log and console output, and replay proceeds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning </dev:code><dev:remarks><maml:para> PS C:\> Start-DbaXESmartTarget -SqlInstance sql2016 -Session loadrelay -Responder $response Replays events from sql2016 on sql2017 in the planning database. Returns a PowerShell job object. To see a list of all SmartTarget job objects, use Get-DbaXESmartTarget. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning </dev:code><dev:remarks><maml:para> PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session 'Profiler Standard' -Responder $response -NotAsJob Replays events from the 'Profiler Standard' session on sql2016 to sql2017's planning database. Does not run as a job so you can see the raw output. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESmartReplay</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>New-DbaXESmartTableWriter</command:name><command:noun>DbaXESmartTableWriter</command:noun><command:verb>New</command:verb><maml:description><maml:para>This response type is used to write Extended Events to a database table.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>The 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.</maml:para><maml:para>The columns of the target table and the fields/actions of the events are mapped by name (case-sensitive).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaXESmartTableWriter</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specifies the name of the target table.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTargetTable</maml:name><maml:description><maml:para>If this switch is enabled, XESmartTarget will infer the definition of the target table from the columns captured in the Extended Events session. If the target table already exists, it will not be recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UploadIntervalSeconds</maml:name><maml:description><maml:para>Specifies the number of seconds XESmartTarget will keep the events in memory before dumping them to the target table. The default is 10 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Specifies a list of events to be processed (with others being ignored. By default, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumn</maml:name><maml:description><maml:para>Specifies the list of columns to output from the events. XESmartTarget will capture in memory and write to the target table only the columns (fields or targets) that are present in this list. Fields and actions are matched in a case-sensitive manner. Expression columns are supported. Specify a column with ColumnName AS Expression to add an expression column (Example: Total AS Reads + Writes)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTargetTable</maml:name><maml:description><maml:para>If this switch is enabled, XESmartTarget will infer the definition of the target table from the columns captured in the Extended Events session. If the target table already exists, it will not be recreated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Event</maml:name><maml:description><maml:para>Specifies a list of events to be processed (with others being ignored. By default, all events are processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Filter</maml:name><maml:description><maml:para>Specifies a filter expression in the same form as you would use in the WHERE clause of a SQL query. Example: duration > 10000 AND cpu_time > 10000</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputColumn</maml:name><maml:description><maml:para>Specifies the list of columns to output from the events. XESmartTarget will capture in memory and write to the target table only the columns (fields or targets) that are present in this list. Fields and actions are matched in a case-sensitive manner. Expression columns are supported. Specify a column with ColumnName AS Expression to add an expression column (Example: Total AS Reads + Writes)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Specifies the name of the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UploadIntervalSeconds</maml:name><maml:description><maml:para>Specifies the number of seconds XESmartTarget will keep the events in memory before dumping them to the target table. The default is 10 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT SmartTarget: by Gianluca Sartori (@spaghettidba) </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $columns = "cpu_time", "duration", "physical_reads", "logical_reads", "writes", "row_count", "batch_text" </dev:code><dev:remarks><maml:para> PS C:\> $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumn $columns -Filter "duration > 10000" PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response Writes Extended Events to the deadlocktracker table in dbadb on sql2017. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaXESmartTableWriter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Publish-DbaDacPackage</command:name><command:noun>DbaDacPackage</command:noun><command:verb>Publish</command:verb><maml:description><maml:para>The Publish-DbaDacPackage command takes a dacpac or bacpac and publishes it to a database.</maml:para></maml:description></command:details><maml:description><maml:para>Publishes the dacpac taken from SSDT project or Export-DbaDacPackage. Changing the schema to match the dacpac and also to run any scripts in the dacpac (pre/post deploy scripts) or bacpac.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Publish-DbaDacPackage</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the filesystem path to the DACPAC</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database being published.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>Specifies the connection string to the database you are upgrading. This is not required if SqlInstance is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GenerateDeploymentReport</maml:name><maml:description><maml:para>If this switch is enabled, the publish XML report will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled the publish script will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputPath</maml:name><maml:description><maml:para>Specifies the filesystem path (directory) where output files will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSqlCmdVars</maml:name><maml:description><maml:para>If this switch is enabled, SqlCmdVars in publish.xml will have their values overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacOption</maml:name><maml:description><maml:para>Export options for a corresponding export type. Can be created by New-DbaDacOption -Type Dacpac | Bacpac</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacFxPath</maml:name><maml:description><maml:para>Path to the dac dll. If this is omitted, then the version of dac dll which is packaged with dbatools is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Publish-DbaDacPackage</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the filesystem path to the DACPAC</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishXml</maml:name><maml:description><maml:para>Specifies the publish profile which will include options and sqlCmdVariables.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database being published.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>Specifies the connection string to the database you are upgrading. This is not required if SqlInstance is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GenerateDeploymentReport</maml:name><maml:description><maml:para>If this switch is enabled, the publish XML report will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled the publish script will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputPath</maml:name><maml:description><maml:para>Specifies the filesystem path (directory) where output files will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSqlCmdVars</maml:name><maml:description><maml:para>If this switch is enabled, SqlCmdVars in publish.xml will have their values overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacFxPath</maml:name><maml:description><maml:para>Path to the dac dll. If this is omitted, then the version of dac dll which is packaged with dbatools is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionString</maml:name><maml:description><maml:para>Specifies the connection string to the database you are upgrading. This is not required if SqlInstance is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacFxPath</maml:name><maml:description><maml:para>Path to the dac dll. If this is omitted, then the version of dac dll which is packaged with dbatools is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DacOption</maml:name><maml:description><maml:para>Export options for a corresponding export type. Can be created by New-DbaDacOption -Type Dacpac | Bacpac</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database being published.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GenerateDeploymentReport</maml:name><maml:description><maml:para>If this switch is enabled, the publish XML report will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSqlCmdVars</maml:name><maml:description><maml:para>If this switch is enabled, SqlCmdVars in publish.xml will have their values overwritten.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputPath</maml:name><maml:description><maml:para>Specifies the filesystem path (directory) where output files will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the filesystem path to the DACPAC</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublishXml</maml:name><maml:description><maml:para>Specifies the publish profile which will include options and sqlCmdVariables.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled the publish script will be generated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Only SQL authentication is supported. When not specified, uses Trusted Authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Selecting the type of the export: Dacpac (default) or Bacpac.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Dacpac, Bacpac Author: Richie lee (@richiebzzzt) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT 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. </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Publish </dev:code><dev:remarks><maml:para> PS C:\> $options.DeployOptions.DropObjectsNotInSource = $true PS C:\> Publish-DbaDacPackage -SqlInstance sql2016 -Database DB1 -DacOption $options -Path c:\temp\db.dacpac Uses DacOption object to set Deployment Options and updates DB1 database on sql2016 from the db.dacpac dacpac file, dropping objects that are missing from source. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Publish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\temp\sql2016-WideWorldImporters.dacpac -PublishXml C:\temp\sql2016-WideWorldImporters-publish.xml -Confirm </dev:code><dev:remarks><maml:para> Updates WideWorldImporters on sql2017 from the sql2016-WideWorldImporters.dacpac using the sql2016-WideWorldImporters-publish.xml publish profile. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaDacProfile -SqlInstance sql2016 -Database db2 -Path C:\temp </dev:code><dev:remarks><maml:para> PS C:\> Export-DbaDacPackage -SqlInstance sql2016 -Database db2 | Publish-DbaDacPackage -PublishXml C:\temp\sql2016-db2-publish.xml -Database db1, db2 -SqlInstance sql2017 Creates a publish profile at C:\temp\sql2016-db2-publish.xml, exports the .dacpac to $home\Documents\sql2016-db2.dacpac. Does not prompt for confirmation. then publishes it to the sql2017 server database db2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $loc = "C:\Users\bob\source\repos\Microsoft.Data.Tools.Msbuild\lib\net46\Microsoft.SqlServer.Dac.dll" </dev:code><dev:remarks><maml:para> PS C:\> Publish-DbaDacPackage -SqlInstance "local" -Database WideWorldImporters -Path C:\temp\WideWorldImporters.dacpac -PublishXml C:\temp\WideWorldImporters.publish.xml -DacFxPath $loc -Confirm Publishes the dacpac using a specific dacfx library. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Publish-DbaDacPackage -SqlInstance sql2017 -Database WideWorldImporters -Path C:\temp\sql2016-WideWorldImporters.dacpac -PublishXml C:\temp\sql2016-WideWorldImporters-publish.xml -ScriptOnly </dev:code><dev:remarks><maml:para> Does not deploy the changes, but will generate the deployment script that would be executed against WideWorldImporters. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Publish-DbaDacPackage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Read-DbaAuditFile</command:name><command:noun>DbaAuditFile</command:noun><command:verb>Read</command:verb><maml:description><maml:para>Read Audit details from *.sqlaudit files.</maml:para></maml:description></command:details><maml:description><maml:para>Read Audit details from *.sqlaudit files.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Read-DbaAuditFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the *.sqlaudit file. This is relative to the computer executing the command. UNC paths are supported.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the enumeration object will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the *.sqlaudit file. This is relative to the computer executing the command. UNC paths are supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the enumeration object will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: XE, Audit, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaAuditFile -Path C:\temp\logins.sqlaudit </dev:code><dev:remarks><maml:para> Returns events from C:\temp\logins.sqlaudit. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem C:\temp\audit\*.sqlaudit | Read-DbaAuditFile </dev:code><dev:remarks><maml:para> Returns events from all .sqlaudit files in C:\temp\audit. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaInstanceAudit -SqlInstance sql2014 -Audit LoginTracker | Read-DbaAuditFile </dev:code><dev:remarks><maml:para> Reads remote Audit details by accessing the file over the admin UNC share. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Read-DbaAuditFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Read-DbaBackupHeader</command:name><command:noun>DbaBackupHeader</command:noun><command:verb>Read</command:verb><maml:description><maml:para>Reads and displays detailed information about a SQL Server backup.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Read-DbaBackupHeader</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup file. This can be a full, differential or log backup file. Accepts valid filesystem paths and URLs.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>If this switch is enabled, fewer columns are returned, giving an easy overview.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileList</maml:name><maml:description><maml:para>If this switch is enabled, detailed information about the files within the backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Name of the SQL Server credential that should be used for Azure storage access.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Name of the SQL Server credential that should be used for Azure storage access.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileList</maml:name><maml:description><maml:para>If this switch is enabled, detailed information about the files within the backup is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup file. This can be a full, differential or log backup file. Accepts valid filesystem paths and URLs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>If this switch is enabled, fewer columns are returned, giving an easy overview.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaBackupHeader -SqlInstance sql2016 -Path S:\backups\mydb\mydb.bak </dev:code><dev:remarks><maml:para> Logs into sql2016 using Windows authentication and reads the local file on sql2016, S:\backups\mydb\mydb.bak. If you are running this command on a workstation and connecting remotely, remember that sql2016 cannot access files on your own workstation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaBackupHeader -SqlInstance sql2016 -Path \\nas\sql\backups\mydb\mydb.bak, \\nas\sql\backups\otherdb\otherdb.bak </dev:code><dev:remarks><maml:para> Logs into sql2016 and reads two backup files - mydb.bak and otherdb.bak. The SQL Server service account must have rights to read this file. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaBackupHeader -SqlInstance . -Path C:\temp\myfile.bak -Simple </dev:code><dev:remarks><maml:para> Logs 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $backupinfo = Read-DbaBackupHeader -SqlInstance . -Path C:\temp\myfile.bak </dev:code><dev:remarks><maml:para> PS C:\> $backupinfo.FileList Displays detailed information about each of the datafiles contained in the backupset. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaBackupHeader -SqlInstance . -Path C:\temp\myfile.bak -FileList </dev:code><dev:remarks><maml:para> Also returns detailed information about each of the datafiles contained in the backupset. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> "C:\temp\myfile.bak", "\backupserver\backups\myotherfile.bak" | Read-DbaBackupHeader -SqlInstance sql2016 | Where-Object { $_.BackupSize.Megabyte -gt 100 } </dev:code><dev:remarks><maml:para> Reads the two files and returns only backups larger than 100 MB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem \\nas\sql\*.bak | Read-DbaBackupHeader -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Gets 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaBackupHeader -SqlInstance sql2016 -Path https://dbatoolsaz.blob.core.windows.net/azbackups/restoretime/restoretime_201705131850.bak -AzureCredential AzureBackupUser </dev:code><dev:remarks><maml:para> Gets 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Read-DbaBackupHeader</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Read-DbaTraceFile</command:name><command:noun>DbaTraceFile</command:noun><command:verb>Read</command:verb><maml:description><maml:para>Reads SQL Server trace files</maml:para></maml:description></command:details><maml:description><maml:para>Using the fn_trace_gettable function, a trace file is read and returned as a PowerShell object</maml:para><maml:para>This function returns the whole of the trace file. The information is presented in the format that the trace subsystem uses.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Read-DbaTraceFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the trace file. This path is relative to the SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Search for results only with specific DatabaseName. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Search for results only with specific Logins. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Search for results only with specific Spids. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventClass</maml:name><maml:description><maml:para>Search for results only with specific EventClasses. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectType</maml:name><maml:description><maml:para>Search for results only with specific ObjectTypes. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorId</maml:name><maml:description><maml:para>Search for results only with specific Errors. Filters 'Error in ($ErrorId)' Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventSequence</maml:name><maml:description><maml:para>Search for results only with specific EventSequences. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TextData</maml:name><maml:description><maml:para>Search for results only with specific TextData. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationName</maml:name><maml:description><maml:para>Search for results only with specific ApplicationNames. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>Search for results only with specific ObjectNames. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Where</maml:name><maml:description><maml:para>Custom where clause - use without the word "WHERE". Here are the available columns: TextData BinaryData DatabaseID TransactionID LineNumber NTUserName NTDomainName HostName ClientProcessID ApplicationName LoginName SPID Duration StartTime EndTime Reads Writes CPU Permissions Severity EventSubClass ObjectID Success IndexID IntegerData ServerName EventClass ObjectType NestLevel State Error Mode Handle ObjectName DatabaseName FileName OwnerName RoleName TargetUserName DBUserName LoginSid TargetLoginName TargetLoginSid ColumnPermissions LinkedServerName ProviderName MethodName RowCounts RequestID XactSequence EventSequence BigintData1 BigintData2 GUID IntegerData2 ObjectID2 Type OwnerID ParentName IsSystem Offset SourceDatabaseID SqlHandle SessionLoginName PlanHandle GroupID</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ApplicationName</maml:name><maml:description><maml:para>Search for results only with specific ApplicationNames. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Search for results only with specific DatabaseName. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorId</maml:name><maml:description><maml:para>Search for results only with specific Errors. Filters 'Error in ($ErrorId)' Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventClass</maml:name><maml:description><maml:para>Search for results only with specific EventClasses. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventSequence</maml:name><maml:description><maml:para>Search for results only with specific EventSequences. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Search for results only with specific Logins. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectName</maml:name><maml:description><maml:para>Search for results only with specific ObjectNames. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ObjectType</maml:name><maml:description><maml:para>Search for results only with specific ObjectTypes. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the trace file. This path is relative to the SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Search for results only with specific Spids. Uses IN for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TextData</maml:name><maml:description><maml:para>Search for results only with specific TextData. Uses LIKE for comparisons.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Where</maml:name><maml:description><maml:para>Custom where clause - use without the word "WHERE". Here are the available columns: TextData BinaryData DatabaseID TransactionID LineNumber NTUserName NTDomainName HostName ClientProcessID ApplicationName LoginName SPID Duration StartTime EndTime Reads Writes CPU Permissions Severity EventSubClass ObjectID Success IndexID IntegerData ServerName EventClass ObjectType NestLevel State Error Mode Handle ObjectName DatabaseName FileName OwnerName RoleName TargetUserName DBUserName LoginSid TargetLoginName TargetLoginSid ColumnPermissions LinkedServerName ProviderName MethodName RowCounts RequestID XactSequence EventSequence BigintData1 BigintData2 GUID IntegerData2 ObjectID2 Type OwnerID ParentName IsSystem Offset SourceDatabaseID SqlHandle SessionLoginName PlanHandle GroupID</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaTraceFile -SqlInstance sql2016 -Database master, tempdb -Path C:\traces\big.trc </dev:code><dev:remarks><maml:para> Reads the tracefile C:\traces\big.trc, stored on the sql2016 sql server. Filters only results that have master or tempdb as the DatabaseName. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaTraceFile -SqlInstance sql2016 -Database master, tempdb -Path C:\traces\big.trc -TextData 'EXEC SP_PROCOPTION' </dev:code><dev:remarks><maml:para> Reads the tracefile C:\traces\big.trc, stored on the sql2016 sql server. Filters only results that have master or tempdb as the DatabaseName and that have 'EXEC SP_PROCOPTION' somewhere in the text. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaTraceFile -SqlInstance sql2016 -Path C:\traces\big.trc -Where "LinkedServerName = 'myls' and StartTime > '5/30/2017 4:27:52 PM'" </dev:code><dev:remarks><maml:para> Reads the tracefile C:\traces\big.trc, stored on the sql2016 sql server. Filters only results where LinkServerName = myls and StartTime is greater than '5/30/2017 4:27:52 PM'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2014 | Read-DbaTraceFile </dev:code><dev:remarks><maml:para> Reads every trace file on sql2014 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Read-DbaTraceFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Read-DbaTransactionLog</command:name><command:noun>DbaTransactionLog</command:noun><command:verb>Read</command:verb><maml:description><maml:para>Reads the live Transaction log from specified SQL Server Database</maml:para></maml:description></command:details><maml:description><maml:para>Using the fn_dblog function, the live transaction log is read and returned as a PowerShell object</maml:para><maml:para>This function returns the whole of the log. The information is presented in the format that the logging subsystem uses.</maml:para><maml:para>A soft limit of 0.5GB of log as been implemented. This is based on testing. This limit can be overridden</maml:para><maml:para>at the users request, but please be aware that this may have an impact on your target databases and on the</maml:para><maml:para>system running this function</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Read-DbaTransactionLog</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to read the transaction log of</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLimit</maml:name><maml:description><maml:para>Switch to indicate that you wish to bypass the recommended limits of the function</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RowLimit</maml:name><maml:description><maml:para>Will limit the number of rows returned from the transaction log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to read the transaction log of</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLimit</maml:name><maml:description><maml:para>Switch to indicate that you wish to bypass the recommended limits of the function</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RowLimit</maml:name><maml:description><maml:para>Will limit the number of rows returned from the transaction log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Log, LogFile, Utility Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Log = Read-DbaTransactionLog -SqlInstance sql2016 -Database MyDatabase </dev:code><dev:remarks><maml:para> Will read the contents of the transaction log of MyDatabase on SQL Server Instance sql2016 into the local PowerShell object $Log </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Log = Read-DbaTransactionLog -SqlInstance sql2016 -Database MyDatabase -IgnoreLimit </dev:code><dev:remarks><maml:para> Will 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Read-DbaTransactionLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Read-DbaXEFile</command:name><command:noun>DbaXEFile</command:noun><command:verb>Read</command:verb><maml:description><maml:para>Read XEvents from a *.xel or *.xem file.</maml:para></maml:description></command:details><maml:description><maml:para>Read XEvents from a *.xel or *.xem file.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Read-DbaXEFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the *.xem or *.xem file. This is relative to the computer executing the command. UNC paths are supported.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the Microsoft.SqlServer.XEvent.Linq.PublishedEvent enumeration object will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to the *.xem or *.xem file. This is relative to the computer executing the command. UNC paths are supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the Microsoft.SqlServer.XEvent.Linq.PublishedEvent enumeration object will be returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Read-DbaXEFile -Path C:\temp\deadocks.xel </dev:code><dev:remarks><maml:para> Returns events from C:\temp\deadocks.xel. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem C:\temp\xe\*.xel | Read-DbaXEFile </dev:code><dev:remarks><maml:para> Returns events from all .xel files in C:\temp\xe. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2014 -Session deadlocks | Read-DbaXEFile </dev:code><dev:remarks><maml:para> Reads remote XEvents by accessing the file over the admin UNC share. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Read-DbaXEFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Register-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Register</command:verb><maml:description><maml:para>Registers an existing configuration object in registry.</maml:para></maml:description></command:details><maml:description><maml:para>Registers an existing configuration object in registry.</maml:para><maml:para>This allows simple persisting of settings across powershell consoles.</maml:para><maml:para>It also can be used to generate a registry template, which can then be used to create policies.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Register-DbatoolsConfig</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The configuration object to write to registry. Can be retrieved using Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the setting to be written to registry.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Default: UserDefault Who will be affected by this export how? Current user or all? Default setting or enforced? Legal values: UserDefault, UserMandatory, SystemDefault, SystemMandatory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Register-DbatoolsConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The name of the module, whose settings should be written to registry.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Default: "*" Used in conjunction with the -Module parameter to restrict the number of configuration items written to registry.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Default: UserDefault Who will be affected by this export how? Current user or all? Default setting or enforced? Legal values: UserDefault, UserMandatory, SystemDefault, SystemMandatory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Config</maml:name><maml:description><maml:para>The configuration object to write to registry. Can be retrieved using Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the setting to be written to registry.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The name of the module, whose settings should be written to registry.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Default: "*" Used in conjunction with the -Module parameter to restrict the number of configuration items written to registry.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Default: UserDefault Who will be affected by this export how? Current user or all? Default setting or enforced? Legal values: UserDefault, UserMandatory, SystemDefault, SystemMandatory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig message.style.* | Register-DbatoolsConfig </dev:code><dev:remarks><maml:para> Retrieves all configuration items that that start with message.style. and registers them in registry for the current user. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Register-DbatoolsConfig -FullName "message.consoleoutput.disable" -Scope SystemDefault </dev:code><dev:remarks><maml:para> Retrieves the configuration item "message.consoleoutput.disable" and registers it in registry as the default setting for all users on this machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Register-DbatoolsConfig -Module Message -Scope SystemMandatory </dev:code><dev:remarks><maml:para> Retrieves all configuration items of the module Message, then registers them in registry to enforce them for all users on the current system. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Register-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgDatabase</command:name><command:noun>DbaAgDatabase</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database from an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database from an availability group on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgDatabase</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove databases from specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove databases from specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgDatabase -SqlInstance sqlserver2012 -AvailabilityGroup ag1, ag2 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes all databases from the ag1 and ag2 availability groups on sqlserver2012. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgDatabase -SqlInstance sqlserver2012 -AvailabilityGroup ag1 -Database pubs -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the pubs database from the ag1 availability group on sqlserver2012. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2012 -AvailabilityGroup availabilitygroup1 | Remove-DbaAgDatabase </dev:code><dev:remarks><maml:para> Removes the availability groups returned from the Get-DbaAvailabilityGroup function. Prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentAlert</command:name><command:noun>DbaAgentAlert</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes SQL Agent agent alert(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the SQL Agent alert(s) that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaAgentAlert will be executed with the parameters provided</maml:para><maml:para>and the returned SQL Agent alert(s) will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentAlert</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>Specifies one or more SQL Agent alert(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>Specifies one or more SQL Agent alert(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentAlert</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentAlert.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Alert[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Alert[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>Specifies one or more SQL Agent alert(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAlert</maml:name><maml:description><maml:para>Specifies one or more SQL Agent alert(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentAlert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Alert[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Alert[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert Author: Mikey Bronowski (@MikeyBronowski), bronowski.it dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentAlert -SqlInstance localhost, localhost\namedinstance </dev:code><dev:remarks><maml:para> Removes all SQL Agent alerts on the localhost, localhost\namedinstance instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentAlert -SqlInstance localhost -Alert MyDatabaseAlert </dev:code><dev:remarks><maml:para> Removes MyDatabaseAlert SQL Agent alert on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlert -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent alert(s) to drop' -OutputMode Multiple | Remove-DbaAgentAlert </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL Agent alerts on SRV1, lets the user select those to remove and then removes the selected SQL Agent alerts. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentAlert</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentAlertCategory</command:name><command:noun>DbaAgentAlertCategory</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Remove-DbaAgentAlertCategory removes an alert category.</maml:para></maml:description></command:details><maml:description><maml:para>Remove-DbaAgentAlertCategory makes it possible to remove an alert category.</maml:para><maml:para>Insure that the category you want to remove is not used with any alerts. If an alert uses this category it will be get the category [Uncategorized].</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentAlertCategory</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentAlertCategory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentAlertCategory.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentAlertCategory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert, AlertCategory Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentAlertCategory -SqlInstance sql1 -Category 'Category 1' </dev:code><dev:remarks><maml:para> Remove the alert category Category 1 from the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentAlertCategory -SqlInstance sql1 -Category Category1, Category2, Category3 </dev:code><dev:remarks><maml:para> Remove multiple alert categories from the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentAlertCategory -SqlInstance sql1, sql2, sql3 -Category Category1, Category2, Category3 </dev:code><dev:remarks><maml:para> Remove multiple alert categories from the multiple instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentAlertCategory -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent alert category(-ies) to drop' -OutputMode Multiple | Remove-DbaAgentAlertCategory </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL Agent alert category(-ies) on SRV1, lets the user select those to remove and then removes the selected SQL Agent alert category(-ies). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentAlertCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Remove-DbaAgentJob removes a job.</maml:para></maml:description></command:details><maml:description><maml:para>Remove-DbaAgentJob removes a job in the SQL Server Agent.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentJob</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job. Can be null if the the job id is being used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepHistory</maml:name><maml:description><maml:para>Specifies to keep the history for the job. By default history is deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepUnusedSchedule</maml:name><maml:description><maml:para>Specifies to keep the schedules attached to this job if they are not attached to any other job. By default the unused schedule is deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mode</maml:name><maml:description><maml:para>Default: Strict How strict does the command take lesser issues? Strict: Interrupt if the job specified doesn't exist. Lazy: Silently skip over jobs that don't exist.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaMode</command:parameterValue><dev:type><maml:name>DbaMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job. Can be null if the the job id is being used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepHistory</maml:name><maml:description><maml:para>Specifies to keep the history for the job. By default history is deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepUnusedSchedule</maml:name><maml:description><maml:para>Specifies to keep the schedules attached to this job if they are not attached to any other job. By default the unused schedule is deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mode</maml:name><maml:description><maml:para>Default: Strict How strict does the command take lesser issues? Strict: Interrupt if the job specified doesn't exist. Lazy: Silently skip over jobs that don't exist.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaMode</command:parameterValue><dev:type><maml:name>DbaMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJob -SqlInstance sql1 -Job Job1 </dev:code><dev:remarks><maml:para> Removes the job from the instance with the name Job1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> GetDbaAgentJob -SqlInstance sql1 -Job Job1 | Remove-DbaAgentJob -KeepHistory </dev:code><dev:remarks><maml:para> Removes the job but keeps the history </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJob -SqlInstance sql1 -Job Job1 -KeepUnusedSchedule </dev:code><dev:remarks><maml:para> Removes the job but keeps the unused schedules </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job Job1 </dev:code><dev:remarks><maml:para> Removes the job from multiple servers </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentJobCategory</command:name><command:noun>DbaAgentJobCategory</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Remove-DbaAgentJobCategory removes a job category.</maml:para></maml:description></command:details><maml:description><maml:para>Remove-DbaAgentJobCategory makes it possible to remove a job category.</maml:para><maml:para>Be 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)].</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentJobCategory</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". If no category is used all categories types will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentJobCategory</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentJobCategory.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobCategory[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobCategory[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryType</maml:name><maml:description><maml:para>The type of category. This can be "LocalJob", "MultiServerJob" or "None". If no category is used all categories types will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentJobCategory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobCategory[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobCategory[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobCategory Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobCategory -SqlInstance sql1 -Category 'Category 1' </dev:code><dev:remarks><maml:para> Remove the job category Category 1 from the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobCategory -SqlInstance sql1 -Category Category1, Category2, Category3 </dev:code><dev:remarks><maml:para> Remove multiple job categories from the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobCategory -SqlInstance sql1, sql2, sql3 -Category Category1, Category2, Category3 </dev:code><dev:remarks><maml:para> Remove multiple job categories from the multiple instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJobCategory -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent job category(-ies) to drop' -OutputMode Multiple | Remove-DbaAgentJobCategory </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL Agent job category(-ies) on SRV1, lets the user select those to remove and then removes the selected SQL Agent job category(-ies). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentJobCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentJobStep</command:name><command:noun>DbaAgentJobStep</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a step from the specified SQL Agent job.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a job step from a SQL Server Agent job.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentJobStep</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the job step.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mode</maml:name><maml:description><maml:para>Default: Strict How strict does the command take lesser issues? Strict: Interrupt if the configuration already has the same value as the one specified. Lazy: Silently skip over instances that already have this configuration at the specified value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaMode</command:parameterValue><dev:type><maml:name>DbaMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Mode</maml:name><maml:description><maml:para>Default: Strict How strict does the command take lesser issues? Strict: Interrupt if the configuration already has the same value as the one specified. Lazy: Silently skip over instances that already have this configuration at the specified value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaMode</command:parameterValue><dev:type><maml:name>DbaMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the job step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 </dev:code><dev:remarks><maml:para> Remove 'Step1' from job 'Job1' on sql1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobStep -SqlInstance sql1 -Job Job1, Job2, Job3 -StepName Step1 </dev:code><dev:remarks><maml:para> Remove the job step from multiple jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1 </dev:code><dev:remarks><maml:para> Remove the job step from the job on multiple servers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | Remove-DbaAgentJobStep -Job Job1 -StepName Step1 </dev:code><dev:remarks><maml:para> Remove the job step from the job on multiple servers using pipeline. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentJobStep</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentOperator</command:name><command:noun>DbaAgentOperator</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes an operator from an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Drop an operator from SQL Agent.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentOperator</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operator(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentOperator</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operator(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentOperator.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Operator[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Operator[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeOperator</maml:name><maml:description><maml:para>The operator(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentOperator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Operator[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Operator[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Operator Author: Tracy Boggiano (@TracyBoggiano), databasesuperhero.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentOperator -SqlInstance sql01 -Operator DBA </dev:code><dev:remarks><maml:para> This removes an operator named DBA from the instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentOperator -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent operator(s) to drop' -OutputMode Multiple | Remove-DbaAgentOperator </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL Agent operator(s) on SRV1, lets the user select those to remove and then removes the selected SQL Agent alert category(-ies). </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentOperator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentProxy</command:name><command:noun>DbaAgentProxy</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes SQL Agent agent proxy(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the SQL Agent proxy(s) that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaAgentProxy will be executed with the parameters provided</maml:para><maml:para>and the returned SQL Agent proxy(s) will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentProxy</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Proxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentProxy</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Proxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentProxy.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.ProxyAccount[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.ProxyAccount[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaAgentProxy.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.ProxyAccount[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.ProxyAccount[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Proxy</maml:name><maml:description><maml:para>Specifies one or more SQL Agent proxy(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Proxy Author: Mikey Bronowski (@MikeyBronowski), bronowski.it dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentProxy -SqlInstance localhost, localhost\namedinstance </dev:code><dev:remarks><maml:para> Removes all SQL Agent proxies on the localhost, localhost\namedinstance instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentProxy -SqlInstance localhost -Proxy MyDatabaseProxy </dev:code><dev:remarks><maml:para> Removes MyDatabaseProxy SQL Agent proxy on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentProxy -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent proxy(s) to drop' -OutputMode Multiple | Remove-DbaAgentProxy </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL Agent proxies on SRV1, lets the user select those to remove and then removes the selected SQL Agent proxies. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentProxy</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes job schedules.</maml:para></maml:description></command:details><maml:description><maml:para>Removes the schedules that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaAgentSchedule will be executed with the parameters provided</maml:para><maml:para>and the returned schedules will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentSchedule</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>The name of the job schedule. Please note that there can be several schedules with the same name. These differ then only in the Id or the ScheduleUid.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleUid</maml:name><maml:description><maml:para>The unique identifier of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>The Id of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Remove the schedules even if they where used in one or more jobs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaAgentSchedule</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of schedules (such as returned by Get-DbaAgentSchedule), to be removed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.ScheduleBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.ScheduleBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Remove the schedules even if they where used in one or more jobs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Remove the schedules even if they where used in one or more jobs.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>The Id of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of schedules (such as returned by Get-DbaAgentSchedule), to be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.ScheduleBase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.ScheduleBase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>The name of the job schedule. Please note that there can be several schedules with the same name. These differ then only in the Id or the ScheduleUid.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleUid</maml:name><maml:description><maml:para>The unique identifier of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, Schedule Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1 -Schedule weekly </dev:code><dev:remarks><maml:para> Remove the schedule weekly. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1 -Schedule weekly -Force </dev:code><dev:remarks><maml:para> Remove the schedule weekly even if the schedule is being used by jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1 -Schedule daily, weekly </dev:code><dev:remarks><maml:para> Remove multiple schedules. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1, sql2, sql3 -Schedule daily, weekly </dev:code><dev:remarks><maml:para> Remove the schedule on multiple servers for multiple schedules. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance sql1 -Schedule sched1, sched2, sched3 | Remove-DbaAgentSchedule </dev:code><dev:remarks><maml:para> Remove the schedules using a pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1, sql2, sql3 -ScheduleUid 'bf57fa7e-7720-4936-85a0-87d279db7eb7' </dev:code><dev:remarks><maml:para> Remove the schedules using the schedule uid. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgListener</command:name><command:noun>DbaAgListener</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a listener from an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a listener from an availability group on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgListener</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>The listener or listeners to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove listeners from specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaListener</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove listeners from specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaListener</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>The listener or listeners to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgListener -SqlInstance sqlserver2012 -AvailabilityGroup ag1, ag2 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the ag1 and ag2 availability groups on sqlserver2012. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2012 -AvailabilityGroup availabilitygroup1 | Remove-DbaAgListener </dev:code><dev:remarks><maml:para> Removes the listeners returned from the Get-DbaAvailabilityGroup function. Prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgListener</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAgReplica</command:name><command:noun>DbaAgReplica</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes availability group replicas from availability groups.</maml:para></maml:description></command:details><maml:description><maml:para>Removes availability group replicas from availability groups.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgReplica</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The specific availability group to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>The replica to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgReplica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityReplica[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The specific availability group to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgReplica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityReplica[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>The replica to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgReplica -SqlInstance sql2017a -AvailabilityGroup SharePoint -Replica sp1 </dev:code><dev:remarks><maml:para> Removes the sp1 replica from the SharePoint ag on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAgReplica -SqlInstance sql2017a | Select-Object * </dev:code><dev:remarks><maml:para> Returns full object properties on all availability group replicas found on sql2017a </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgReplica</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes availability groups on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes availability groups on a SQL Server instance.</maml:para><maml:para>If possible, remove the availability group only while connected to the server instance that hosts the primary replica.</maml:para><maml:para>When the availability group is dropped from the primary replica, changes are allowed in the former primary databases (without high availability protection).</maml:para><maml:para>Deleting an availability group from a secondary replica leaves the primary replica in the RESTORING state, and changes are not allowed on the databases.</maml:para><maml:para>Avoid dropping an availability group when the Windows Server Failover Clustering (WSFC) cluster has no quorum.</maml:para><maml:para>If you must drop an availability group while the cluster lacks quorum, the metadata availability group that is stored in the cluster is not removed.</maml:para><maml:para>After the cluster regains quorum, you will need to drop the availability group again to remove it from the WSFC cluster.</maml:para><maml:para>For more information: https://docs.microsoft.com/en-us/sql/t-sql/statements/drop-availability-group-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAvailabilityGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllAvailabilityGroups</maml:name><maml:description><maml:para>Remove all availability groups on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllAvailabilityGroups</maml:name><maml:description><maml:para>Remove all availability groups on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only remove specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAvailabilityGroup -SqlInstance sqlserver2012 -AllAvailabilityGroups </dev:code><dev:remarks><maml:para> Removes all availability groups on the sqlserver2014 instance. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaAvailabilityGroup -SqlInstance sqlserver2012 -AvailabilityGroup ag1, ag2 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the ag1 and ag2 availability groups on sqlserver2012. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sqlserver2012 -AvailabilityGroup availabilitygroup1 | Remove-DbaAvailabilityGroup </dev:code><dev:remarks><maml:para> Removes the availability groups returned from the Get-DbaAvailabilityGroup function. Prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaBackup</command:name><command:noun>DbaBackup</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes SQL Server backups from disk.</maml:para></maml:description></command:details><maml:description><maml:para>Removes SQL Server backups from disk.</maml:para><maml:para>Provides all of the same functionality for removing SQL backups from disk as a standard maintenance plan would.</maml:para><maml:para>As 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.</maml:para><maml:para>Also included is the ability to remove empty folders as part of this cleanup activity.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaBackup</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the name of the base level folder to search for backup files. Deletion of backup files will be recursive from this location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFileExtension</maml:name><maml:description><maml:para>Specifies the filename extension of the backup files you wish to remove (typically 'bak', 'trn' or 'log'). Do not include the period.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetentionPeriod</maml:name><maml:description><maml:para>Specifies the retention period for backup files. Correct format is ##U. ## is the retention value and must be an integer value U signifies the units where the valid units are: h = hours d = days w = weeks m = months Formatting Examples: '48h' = 48 hours '7d' = 7 days '4w' = 4 weeks '1m' = 1 month</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckArchiveBit</maml:name><maml:description><maml:para>If this switch is enabled, the filesystem Archive bit is checked before deletion. If this bit is set (which translates to "it has not been backed up to another location yet", the file won't be deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveEmptyBackupFolder</maml:name><maml:description><maml:para>If this switch is enabled, empty folders will be removed after the cleanup process is complete.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFileExtension</maml:name><maml:description><maml:para>Specifies the filename extension of the backup files you wish to remove (typically 'bak', 'trn' or 'log'). Do not include the period.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckArchiveBit</maml:name><maml:description><maml:para>If this switch is enabled, the filesystem Archive bit is checked before deletion. If this bit is set (which translates to "it has not been backed up to another location yet", the file won't be deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the name of the base level folder to search for backup files. Deletion of backup files will be recursive from this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveEmptyBackupFolder</maml:name><maml:description><maml:para>If this switch is enabled, empty folders will be removed after the cleanup process is complete.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetentionPeriod</maml:name><maml:description><maml:para>Specifies the retention period for backup files. Correct format is ##U. ## is the retention value and must be an integer value U signifies the units where the valid units are: h = hours d = days w = weeks m = months Formatting Examples: '48h' = 48 hours '7d' = 7 days '4w' = 4 weeks '1m' = 1 month</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, DisasterRecovery Author: Chris Sommer (@cjsommer), www.cjsommer.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaBackup -Path 'C:\MSSQL\SQL Backup\' -BackupFileExtension trn -RetentionPeriod 48h </dev:code><dev:remarks><maml:para> '*.trn' files in 'C:\MSSQL\SQL Backup\' and all subdirectories that are more than 48 hours old will be removed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaBackup -Path 'C:\MSSQL\SQL Backup\' -BackupFileExtension trn -RetentionPeriod 48h -WhatIf </dev:code><dev:remarks><maml:para> Same as example #1, but doesn't actually remove any files. The function will instead show you what would be done. This is useful when first experimenting with using the function. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaBackup -Path 'C:\MSSQL\Backup\' -BackupFileExtension bak -RetentionPeriod 7d -CheckArchiveBit </dev:code><dev:remarks><maml:para> '*.bak' files in 'C:\MSSQL\Backup\' 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 Archive bit. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaBackup -Path 'C:\MSSQL\Backup\' -BackupFileExtension bak -RetentionPeriod 1w -RemoveEmptyBackupFolder </dev:code><dev:remarks><maml:para> '*.bak' files in 'C:\MSSQL\Backup\' and all subdirectories that are more than 1 week old will be removed. Any folders left empty will be removed as well. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaBackup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaClientAlias</command:name><command:noun>DbaClientAlias</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a sql alias for the specified server - mimics cliconfg.exe</maml:para></maml:description></command:details><maml:description><maml:para>Removes a sql alias for the specified server by altering HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client - mimics cliconfg.exe.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaClientAlias</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>The alias or array of aliases to be deleted</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alias</maml:name><maml:description><maml:para>The alias or array of aliases to be deleted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer where the alias will be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to remote computers using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlClient, Alias Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaClientAlias -ComputerName workstationX -Alias sqlps </dev:code><dev:remarks><maml:para> Removes the sqlps SQL Client alias on workstationX </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaClientAlias | Remove-DbaClientAlias </dev:code><dev:remarks><maml:para> Removes all SQL Server client aliases on the local computer </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaClientAlias</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaCmConnection</command:name><command:noun>DbaCmConnection</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes connection objects from the connection cache used for remote computer management.</maml:para></maml:description></command:details><maml:description><maml:para>Removes connection objects from the connection cache used for remote computer management.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaCmConnection</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Accepts both text as well as the output of Get-DbaCmConnection.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Accepts both text as well as the output of Get-DbaCmConnection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaCmConnection -ComputerName sql2014 </dev:code><dev:remarks><maml:para> Removes the cached connection to the server sql2014 from the cache. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection | Remove-DbaCmConnection </dev:code><dev:remarks><maml:para> Clears the entire connection cache. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaCmConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaComputerCertificate</command:name><command:noun>DbaComputerCertificate</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a computer certificate - useful for removing easily certs from remote computers</maml:para></maml:description></command:details><maml:description><maml:para>Removes a computer certificate from a local or remote computer</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaComputerCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>The thumbprint of the certificate object</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine (otherwise exceptions can be thrown on remote connections)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine (otherwise exceptions can be thrown on remote connections)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>The thumbprint of the certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 </dev:code><dev:remarks><maml:para> Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the LocalMachine store on Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaComputerCertificate | Where-Object Thumbprint -eq E0A071E387396723C45E92D42B2D497C6A182340 | Remove-DbaComputerCertificate </dev:code><dev:remarks><maml:para> Removes certificate using the pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaComputerCertificate -ComputerName Server1 -Thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 -Store User -Folder My </dev:code><dev:remarks><maml:para> Removes certificate with thumbprint C2BBE81A94FEE7A26FFF86C2DFDAF6BFD28C6C94 in the User\My (Personal) store on Server1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaComputerCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaCredential</command:name><command:noun>DbaCredential</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes SQL credential(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the SQL credential(s) that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaCredential will be executed with the parameters provided</maml:para><maml:para>and the returned SQL credential(s) will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaCredential</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCredential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaCredential</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCredential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaCredential.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Credential[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Credential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeCredential</maml:name><maml:description><maml:para>Specifies one or more SQL credential(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeIdentity</maml:name><maml:description><maml:para>Excluded identities</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Identity</maml:name><maml:description><maml:para>Only include specific identities Note: if spaces exist in the credential identity, you will have to type "" or '' around it.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaCredential.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Credential[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Credential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Security, Credential Author: Mikey Bronowski (@MikeyBronowski), bronowski.it dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaCredential -SqlInstance localhost, localhost\namedinstance </dev:code><dev:remarks><maml:para> Removes all SQL credentials on the localhost, localhost\namedinstance instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaCredential -SqlInstance localhost -Credential MyDatabaseCredential </dev:code><dev:remarks><maml:para> Removes MyDatabaseCredential SQL credential on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCredential -SqlInstance SRV1 | Out-GridView -Title 'Select SQL credential(s) to drop' -OutputMode Multiple | Remove-DbaCredential </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all SQL credentials on SRV1, lets the user select those to remove and then removes the selected SQL credentials. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaCredential</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaCustomError</command:name><command:noun>DbaCustomError</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a user defined message from sys.messages. This command does not support Azure SQL Database.</maml:para></maml:description></command:details><maml:description><maml:para>This command provides a wrapper for the sp_dropmessage system procedure that allows for user defined messages to be removed from sys.messages.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaCustomError</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageID</maml:name><maml:description><maml:para>An integer between 50001 and 2147483647.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Language for the message to be removed. The valid values for Language are contained in the Name and Alias columns from sys.syslanguages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Language for the message to be removed. The valid values for Language are contained in the Name and Alias columns from sys.syslanguages.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MessageID</maml:name><maml:description><maml:para>An integer between 50001 and 2147483647.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, Error Author: Adam Lancaster, github.com/lancasteradam Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaCustomError -SqlInstance sqldev01, sqldev02 -MessageID 70001 -Language "French" </dev:code><dev:remarks><maml:para> Removes the custom message on the sqldev01 and sqldev02 instances with ID 70001 and language French. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaCustomError -SqlInstance sqldev01, sqldev02 -MessageID 70001 -Language "All" </dev:code><dev:remarks><maml:para> Removes all custom messages on the sqldev01 and sqldev02 instances with ID 70001. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance sqldev01 </dev:code><dev:remarks><maml:para> PS C:\> $newMessage = New-DbaCustomError -SqlInstance $server -MessageID 70000 -Severity 16 -MessageText "test_70000" Creates a new custom message on the sqldev01 instance with ID 70000, severity 16, and text "test_70000" To modify the custom message at a later time the following can be done to change the severity from 16 to 20: PS C:\> $original = $server.UserDefinedMessages | Where-Object ID -eq 70000 PS C:\> $messageID = $original.ID PS C:\> $severity = 20 PS C:\> $text = $original.Text PS C:\> $language = $original.Language PS C:\> $removed = Remove-DbaCustomError -SqlInstance $server -MessageID 70000 PS C:\> $alteredMessage = New-DbaCustomError -SqlInstance $server -MessageID $messageID -Severity $severity -MessageText $text -Language $language -WithLog The resulting updated message object is available in $alteredMessage. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaCustomError</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drops a user database, hopefully even the really stuck ones.</maml:para></maml:description></command:details><maml:description><maml:para>Tries a bunch of different ways to remove a user created database or two or more.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be removed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Delete, Database Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabase -SqlInstance sql2016 -Database containeddb </dev:code><dev:remarks><maml:para> Prompts then removes the database containeddb on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabase -SqlInstance sql2016 -Database containeddb, mydb </dev:code><dev:remarks><maml:para> Prompts then removes the databases containeddb and mydb on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabase -SqlInstance sql2016 -Database containeddb -Confirm:$false </dev:code><dev:remarks><maml:para> Does not prompt and swiftly removes containeddb on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance server\instance | Remove-DbaDatabase </dev:code><dev:remarks><maml:para> Removes all the user databases from server\instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance server\instance | Remove-DbaDatabase -Confirm:$false </dev:code><dev:remarks><maml:para> Removes all the user databases from server\instance without any confirmation </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDatabaseSafely</command:name><command:noun>DbaDatabaseSafely</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Safely removes a SQL Database and creates an Agent Job to restore it.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>With huge thanks to Grant Fritchey and his verify your backups video. Take a look, it's only 3 minutes long. http://sqlps.io/backuprant</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDatabaseSafely</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>If specified, Agent jobs will be created on this server. By default, the jobs will be created on the server specified by SqlInstance. You must have sysadmin access and the server must be SQL Server 2000 or higher. The SQL Agent service will be started if it is not already running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDbccCheckDb</maml:name><maml:description><maml:para>If this switch is enabled, the initial DBCC CHECK DB will be skipped. This will make the process quicker but will also allow you to create an Agent job that restores a database backup containing a corrupt database. A second DBCC CHECKDB is performed on the restored database so you will still be notified BUT USE THIS WITH CARE.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFolder</maml:name><maml:description><maml:para>Specifies the path to a folder where the final backups of the removed databases will be stored. If you are using separate source and destination servers, you must specify a UNC path such as \\SERVER1\BACKUPSHARE\</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryName</maml:name><maml:description><maml:para>Specifies the Category Name for the Agent job that is created for restoring the database(s). By default, the name is "Rationalisation".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobOwner</maml:name><maml:description><maml:para>Specifies the name of the account which will own the Agent jobs. By default, sa is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, all user databases on the server will be removed. This is useful when decommissioning a server. You should use a Destination with this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupCompression</maml:name><maml:description><maml:para>If this switch is enabled, compression will be used for the backup regardless of the SQL Server instance setting. By default, the SQL Server instance setting for backup compression is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, the source folder structure will be used when restoring instead of using the destination instance default folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, all actions will be performed even if DBCC errors are detected. An Agent job will be created with 'DBCCERROR' in the name and the backup file will have 'DBCC' in its name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, all user databases on the server will be removed. This is useful when decommissioning a server. You should use a Destination with this switch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupCompression</maml:name><maml:description><maml:para>If this switch is enabled, compression will be used for the backup regardless of the SQL Server instance setting. By default, the SQL Server instance setting for backup compression is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupFolder</maml:name><maml:description><maml:para>Specifies the path to a folder where the final backups of the removed databases will be stored. If you are using separate source and destination servers, you must specify a UNC path such as \\SERVER1\BACKUPSHARE\</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CategoryName</maml:name><maml:description><maml:para>Specifies the Category Name for the Agent job that is created for restoring the database(s). By default, the name is "Rationalisation".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>If specified, Agent jobs will be created on this server. By default, the jobs will be created on the server specified by SqlInstance. You must have sysadmin access and the server must be SQL Server 2000 or higher. The SQL Agent service will be started if it is not already running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, all actions will be performed even if DBCC errors are detected. An Agent job will be created with 'DBCCERROR' in the name and the backup file will have 'DBCC' in its name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>JobOwner</maml:name><maml:description><maml:para>Specifies the name of the account which will own the Agent jobs. By default, sa is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDbccCheckDb</maml:name><maml:description><maml:para>If this switch is enabled, the initial DBCC CHECK DB will be skipped. This will make the process quicker but will also allow you to create an Agent job that restores a database backup containing a corrupt database. A second DBCC CHECKDB is performed on the restored database so you will still be notified BUT USE THIS WITH CARE.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, the source folder structure will be used when restoring instead of using the destination instance default folder structure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Delete Author: Rob Sewell (@SQLDBAWithBeard), sqldbawithabeard.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabaseSafely -SqlInstance 'Fade2Black' -Database RideTheLightning -BackupFolder 'C:\MSSQL\Backup\Rationalised - DO NOT DELETE' </dev:code><dev:remarks><maml:para> Performs 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 job 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. Any DBCC errors will be written to your documents folder </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Database = 'DemoNCIndex','RemoveTestDatabase' </dev:code><dev:remarks><maml:para> PS C:\> Remove-DbaDatabaseSafely -SqlInstance 'Fade2Black' -Database $Database -BackupFolder 'C:\MSSQL\Backup\Rationalised - DO NOT DELETE' Performs a DBCC CHECKDB on two databases, 'DemoNCIndex' and 'RemoveTestDatabase' on server Fade2Black. Then, an Agent job to restore each database from those backups is created. The databases are then dropped, the Agent jobs to restore them run, a DBCC CHECKDB run against the restored databases, and then they are dropped again. Any DBCC errors will be written to your documents folder </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabaseSafely -SqlInstance 'Fade2Black' -Destination JusticeForAll -Database RideTheLightning -BackupFolder '\\BACKUPSERVER\BACKUPSHARE\MSSQL\Rationalised - DO NOT DELETE' </dev:code><dev:remarks><maml:para> Performs 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 . Then, 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 run, a DBCC CHECKDB run against the restored database, and then it is dropped from JusticeForAll. Any DBCC errors will be written to your documents folder </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabaseSafely -SqlInstance IronMaiden -Database $Database -Destination TheWildHearts -BackupFolder Z:\Backups -NoDbccCheckDb -JobOwner 'THEBEARD\Rob' </dev:code><dev:remarks><maml:para> For 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 TheWildHearts with a Job Owner of THEBEARD\Rob to restore each database from that backup using the instance's 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 the database(s) is(are) dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDatabaseSafely -SqlInstance IronMaiden -Database $Database -Destination TheWildHearts -BackupFolder Z:\Backups </dev:code><dev:remarks><maml:para> The 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 database from that backup using the instance's 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 the database(s) is(are) dropped. If there is a DBCC Error, the function will continue to perform rest of the actions and will create an Agent job with 'DBCCERROR' in the name and a Backup file with 'DBCCError' in the name. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDatabaseSafely</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbAsymmetricKey</command:name><command:noun>DbaDbAsymmetricKey</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Deletes specified asymmetric key</maml:para></maml:description></command:details><maml:description><maml:para>Deletes specified asymmetric key</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbAsymmetricKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the asymmetric key to be removed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database from which the asymmetric key will be deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows passing in of AsymmetricKey objects from Get-DbaDbAsymmetricKey</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AsymmetricKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AsymmetricKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database from which the asymmetric key will be deleted.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows passing in of AsymmetricKey objects from Get-DbaDbAsymmetricKey</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AsymmetricKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AsymmetricKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name of the asymmetric key to be removed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Security, Key Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbAsymmetricKey -SqlInstance Server1 -Database Enctest -Name AsCert1 </dev:code><dev:remarks><maml:para> The Asymmetric Key AsCert1 will be removed from the Enctest database on Instance Server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbAsymmetricKey -SqlInstance Server1 -Database Enctest | Remove-DbaDbAsymmetricKey </dev:code><dev:remarks><maml:para> Will remove all the asymmetric keys found in the Enctrst databae on the Server1 instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbAsymmetricKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbBackupRestoreHistory</command:name><command:noun>DbaDbBackupRestoreHistory</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Reduces the size of the backup and restore history tables by deleting old entries for backup sets.</maml:para></maml:description></command:details><maml:description><maml:para>Reduces the size of the backup and restore history tables by deleting the entries for backup sets.</maml:para><maml:para>Can be used at server level, in this case a retention period -KeepDays can be set (default is 30 days).</maml:para><maml:para>Can also be used at database level, in this case the complete history for the database(s) is deleted.</maml:para><maml:para>The backup and restore history tables reside in the msdb database.</maml:para><maml:para>To periodically remove old data from backup and restore history tables it is recommended to schedule the agent job sp_delete_backuphistory from the</maml:para><maml:para>SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbBackupRestoreHistory</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepDays</maml:name><maml:description><maml:para>The number of days of history to keep. Defaults to 30 days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepDays</maml:name><maml:description><maml:para>The number of days of history to keep. Defaults to 30 days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Delete, Backup, Restore, Database Author: IJeb Reitsma Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbBackupRestoreHistory -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Prompts for confirmation then deletes backup and restore history on SQL Server sql2016 older than 30 days (default period) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbBackupRestoreHistory -SqlInstance sql2016 -KeepDays 100 -Confirm:$false </dev:code><dev:remarks><maml:para> Remove backup and restore history on SQL Server sql2016 older than 100 days. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbBackupRestoreHistory -SqlInstance sql2016 -Database db1 </dev:code><dev:remarks><maml:para> Prompts for confirmation then deletes all backup and restore history for database db1 on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 | Remove-DbaDbBackupRestoreHistory -WhatIf </dev:code><dev:remarks><maml:para> Remove complete backup and restore history for all databases on SQL Server sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbBackupRestoreHistory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Deletes specified database certificate</maml:para></maml:description></command:details><maml:description><maml:para>Deletes specified database certificate</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server to create the certificates on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The certificate that will be removed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped certificate objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Certificate[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Certificate[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The certificate that will be removed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped certificate objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Certificate[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Certificate[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server to create the certificates on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbCertificate -SqlInstance Server1 </dev:code><dev:remarks><maml:para> The certificate in the master database on server1 will be removed if it exists. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbCertificate -SqlInstance Server1 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to remove the certificate in the 'db1' database and drops the key. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbCheckConstraint</command:name><command:noun>DbaDbCheckConstraint</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database check constraint(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database check constraint(s), with supported piping from Get-DbaDbCheckConstraint.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbCheckConstraint</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system tables from the check collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbCheckConstraint</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system tables from the check collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbCheckConstraint.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Check[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Check[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemTable</maml:name><maml:description><maml:para>This switch removes all system tables from the check collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbCheckConstraint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Check[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Check[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Check, Constraint, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbCheckConstraint -SqlInstance localhost, sql2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> Removes all check constraints from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $chkcs = Get-DbaDbCheckConstraint -SqlInstance localhost, sql2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> PS C:\> $chkcs | Remove-DbaDbCheckConstraint Removes all check constraints from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbCheckConstraint -SqlInstance localhost, sql2016 -Database db1, db2 -ExcludeSystemTable </dev:code><dev:remarks><maml:para> Removes all check constraints except those in system tables from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbCheckConstraint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbData</command:name><command:noun>DbaDbData</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes all the data from a database(s) for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>This command truncates all the tables in a database. If there are foreign keys and/or views they are scripted out, then dropped before the truncate, and recreated after.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbData</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the directory where the file or files will be exported. Will default to Path.DbatoolsExport Configuration entry</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data Author: Jess Pomfret (@jpomfret), jesspomfret.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbData -SqlInstance localhost -Database dbname </dev:code><dev:remarks><maml:para> Removes all data from the dbname database on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbData -SqlInstance mssql1 -ExcludeDatabase DBA -Confirm:$False </dev:code><dev:remarks><maml:para> Removes all data from all databases on mssql1 except the DBA Database. Doesn't prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $svr = Connect-DbaInstance -SqlInstance mssql1 </dev:code><dev:remarks><maml:para> PS C:\> $svr | Remove-DbaDbData -Database AdventureWorks2017 Removes all data from AdventureWorks2017 on the mssql1 SQL Server Instance, uses piped input from Connect-DbaInstance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance mssql1 -Database AdventureWorks2017 | Remove-DbaDbData </dev:code><dev:remarks><maml:para> Removes all data from AdventureWorks2017 on the mssql1 SQL Server Instance, uses piped input from Get-DbaDatabase. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbEncryptionKey</command:name><command:noun>DbaDbEncryptionKey</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Deletes specified database encryption key</maml:para></maml:description></command:details><maml:description><maml:para>Deletes specified database encryption key</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbEncryptionKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server to create the encryption keys on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the encryption key will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped encryption key objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DatabaseEncryptionKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DatabaseEncryptionKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the encryption key will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped encryption key objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.DatabaseEncryptionKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DatabaseEncryptionKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server to create the encryption keys on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbEncryptionKey -SqlInstance sql01 -Database test </dev:code><dev:remarks><maml:para> Removes the encryption key in the master database on sql01 if it exists. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbEncryptionKey -SqlInstance sql01 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts then removes the encryption key in the 'db1' database on sql01. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbEncryptionKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbFileGroup</command:name><command:noun>DbaDbFileGroup</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes the specified filegroup(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the specified filegroup(s). It is required that the filegroup is empty before it can be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbFileGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name(s) of the filegroup(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase and Get-DbaDbFileGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name(s) of the filegroup(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase and Get-DbaDbFileGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, File, FileGroup Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 </dev:code><dev:remarks><maml:para> Removes the HRFG1 filegroup on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev1 -Database TestDb | Remove-DbaDbFileGroup -FileGroup HRFG1 </dev:code><dev:remarks><maml:para> Passes in the TestDB database from the sqldev1 instance and removes the HRFG1 filegroup. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 | Remove-DbaDbFileGroup </dev:code><dev:remarks><maml:para> Passes in the HRFG1 filegroup from the TestDB database on the sqldev1 instance and removes the filegroup. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbFileGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbLogShipping</command:name><command:noun>DbaDbLogShipping</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Remove-DbaDbLogShipping will remove one or more databases from log shipping</maml:para></maml:description></command:details><maml:description><maml:para>The command Remove-DbaDbLogShipping will remove one or more databases from log shipping</maml:para><maml:para>After running the command it will remove all the jobs, configurations set up for log shipping</maml:para><maml:para>By default the secondary database will NOT be removed.</maml:para><maml:para>Use -RemoveSecondaryDatabase to make the command the secondary database</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbLogShipping</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlInstance</maml:name><maml:description><maml:para>Primary SQL Server instance which contains the primary database(s). You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlInstance</maml:name><maml:description><maml:para>Secondary SQL Server instance which contains the secondary database(s) You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to remove from log shipping. This is the name of the database located on the primary instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveSecondaryDatabase</maml:name><maml:description><maml:para>By default the command will not remove the database from the secondary instance. Use this parameter to make the command remove that database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Use this switch to disable any kind of verbose messages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Database to remove from log shipping. This is the name of the database located on the primary instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>Use this switch to disable any kind of verbose messages</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlInstance</maml:name><maml:description><maml:para>Primary SQL Server instance which contains the primary database(s). You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveSecondaryDatabase</maml:name><maml:description><maml:para>By default the command will not remove the database from the secondary instance. Use this parameter to make the command remove that database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlInstance</maml:name><maml:description><maml:para>Secondary SQL Server instance which contains the secondary database(s) You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LogShipping Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbLogShipping -PrimarySqlInstance sql1 -SecondarySqlInstance sql2 -Database DB1 </dev:code><dev:remarks><maml:para> Remove the log shipping for database DB1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbLogShipping -PrimarySqlInstance sql1 -Database DB1 </dev:code><dev:remarks><maml:para> Remove the log shipping for database DB1 and let the command figure out the secondary instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbLogShipping -PrimarySqlInstance localhost -SecondarySqlInstance sql2 -Database DB1, DB2 </dev:code><dev:remarks><maml:para> Remove the log shipping for multiple database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbLogShipping -PrimarySqlInstance localhost -SecondarySqlInstance localhost -Database DB2 -RemoveSecondaryDatabase </dev:code><dev:remarks><maml:para> Remove the log shipping for database DB2 and remove the database from the secondary instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbLogShipping</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbMailAccount</command:name><command:noun>DbaDbMailAccount</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes database mail account(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the database mail account(s) that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaDbMailAccount will be executed with the parameters provided</maml:para><maml:para>and the returned database mail account(s) will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbMailAccount</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Specifies one or more database mail account(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAccount</maml:name><maml:description><maml:para>Specifies one or more database mail account(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbMailAccount</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbMailAccount.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.MailAccount[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.MailAccount[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Account</maml:name><maml:description><maml:para>Specifies one or more database mail account(s) to delete. If unspecified, all accounts will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeAccount</maml:name><maml:description><maml:para>Specifies one or more database mail account(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbMailAccount.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.MailAccount[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.MailAccount[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DatabaseMail, DbMail, Mail Author: Mikey Bronowski (@MikeyBronowski), bronowski.it dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMailAccount -SqlInstance localhost, localhost\namedinstance </dev:code><dev:remarks><maml:para> Removes all database mail accounts on the localhost, localhost\namedinstance instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMailAccount -SqlInstance localhost -Account MyDatabaseMailAccount </dev:code><dev:remarks><maml:para> Removes MyDatabaseMailAccount database mail account on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailAccount -SqlInstance SRV1 | Out-GridView -Title 'Select database mail account(s) to drop' -OutputMode Multiple | Remove-DbaDbMailAccount </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all database mail accounts on SRV1, lets the user select those to remove and then removes the selected database mail accounts. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbMailAccount</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbMailProfile</command:name><command:noun>DbaDbMailProfile</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes database mail profile(s).</maml:para></maml:description></command:details><maml:description><maml:para>Removes the database mail profile(s) that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaDbMailProfile will be executed with the parameters provided</maml:para><maml:para>and the returned database mail profile(s) will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbMailProfile</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>Specifies one or more database mail profile(s) to get. If unspecified, all profiles will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProfile</maml:name><maml:description><maml:para>Specifies one or more database mail profile(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbMailProfile</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbMailProfile.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.MailProfile[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.MailProfile[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeProfile</maml:name><maml:description><maml:para>Specifies one or more database mail profile(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbMailProfile.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Mail.MailProfile[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Mail.MailProfile[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Profile</maml:name><maml:description><maml:para>Specifies one or more database mail profile(s) to get. If unspecified, all profiles will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DatabaseMail, DBMail, Mail Author: Mikey Bronowski (@MikeyBronowski), bronowski.it dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMailProfile -SqlInstance localhost, localhost\namedinstance </dev:code><dev:remarks><maml:para> Removes all database mail profiles on the localhost, localhost\namedinstance instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMailProfile -SqlInstance localhost -Profile MyDatabaseMailProfile </dev:code><dev:remarks><maml:para> Removes MyDatabaseMailProfile database mail profile on the localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMailProfile -SqlInstance SRV1 | Out-GridView -Title 'Select database mail profile(s) to drop' -OutputMode Multiple | Remove-DbaDbMailProfile </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all database mail profiles on SRV1, lets the user select those to remove and then removes the selected database mail profiles. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbMailProfile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbMasterKey</command:name><command:noun>DbaDbMasterKey</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Deletes specified database master key</maml:para></maml:description></command:details><maml:description><maml:para>Deletes specified database master key</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbMasterKey</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the master key will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>List of databases to exclude from clearing all master keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>Purge the master keys from all databases on an instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.MasterKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.MasterKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>All</maml:name><maml:description><maml:para>Purge the master keys from all databases on an instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the master key will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>List of databases to exclude from clearing all master keys</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables pipeline input from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.MasterKey[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.MasterKey[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMasterKey -SqlInstance sql2017, sql2016 -Database pubs </dev:code><dev:remarks><maml:para> The master key in the pubs database on sql2017 and sql2016 will be removed if it exists. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMasterKey -SqlInstance sql2017 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to remove the master key in the 'db1' database and drops the key. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbMasterKey -SqlInstance sql2017 -Database db1 | Remove-DbaDbMasterKey -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to remove the master key in the 'db1' database and drops the key. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbMirror</command:name><command:noun>DbaDbMirror</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes database mirrors.</maml:para></maml:description></command:details><maml:description><maml:para>Removes database mirrors. Does not set databases in recovery to recovered.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbMirror</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMirror -SqlInstance localhost -Database TestDB </dev:code><dev:remarks><maml:para> Stops the database mirroring session for the TestDB on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMirror -SqlInstance localhost -Database TestDB1, TestDB2 </dev:code><dev:remarks><maml:para> Stops the database mirroring session for the TestDB1 and TestDB2 databases on the localhost instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -Database TestDB1, TestDB2 | Remove-DbaDbMirror </dev:code><dev:remarks><maml:para> Stops the database mirroring session for the TestDB1 and TestDB2 databases on the localhost instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbMirror</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbMirrorMonitor</command:name><command:noun>DbaDbMirrorMonitor</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Stops and deletes the mirroring monitor job for all the databases on the server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Stops and deletes the mirroring monitor job for all the databases on the server instance.</maml:para><maml:para>Basically executes sp_dbmmonitordropmonitoring.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbMirrorMonitor</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012 </dev:code><dev:remarks><maml:para> Stops and deletes the mirroring monitor job for all the databases on sql2008 and sql2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbMirrorMonitor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbOrphanUser</command:name><command:noun>DbaDbOrphanUser</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drop orphan users with no existing login to map</maml:para></maml:description></command:details><maml:description><maml:para>Allows the removal of orphan users from one or more databases</maml:para><maml:para>Orphaned users in SQL Server occur when a database user is based on a login in the master database, but the login no longer exists in master.</maml:para><maml:para>This can occur when the login is deleted, or when the database is moved to another server where the login does not exist.</maml:para><maml:para>If 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.</maml:para><maml:para>If 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 'dbo'. If schemas have underlying objects, you must specify the -Force parameter so the user can be dropped.</maml:para><maml:para>If a login of the same name exists (which could be re-mapped with Repair-DbaDbOrphanUser) the drop will not be performed unless you specify the -Force parameter (only when calling from Repair-DbaDbOrphanUser.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbOrphanUser</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the list of users to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled: If exists any schema which owner is the User, this will force the change of the owner to 'dbo'. If a login of the same name exists the drop will not be performed unless you specify this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled: If exists any schema which owner is the User, this will force the change of the owner to 'dbo'. If a login of the same name exists the drop will not be performed unless you specify this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the list of users to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: User, Orphan, Login Author: Claudio Silva (@ClaudioESSilva) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Finds and drops all orphan users without matching Logins in all databases present on server 'sql2005'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Finds and drops all orphan users without matching Logins in all databases present on server 'sqlserver2014a'. SQL Server authentication will be used in connecting to the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sqlserver2014a -Database db1, db2 -Force </dev:code><dev:remarks><maml:para> Finds and drops orphan users even if they have a matching Login on both db1 and db2 databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sqlserver2014a -ExcludeDatabase db1, db2 -Force </dev:code><dev:remarks><maml:para> Finds and drops orphan users even if they have a matching Login from all databases except db1 and db2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sqlserver2014a -User OrphanUser </dev:code><dev:remarks><maml:para> Removes user OrphanUser from all databases only if there is no matching login. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbOrphanUser -SqlInstance sqlserver2014a -User OrphanUser -Force </dev:code><dev:remarks><maml:para> Removes user OrphanUser from all databases even if they have a matching Login. Any schema that the user owns will change ownership to dbo. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbOrphanUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbPartitionFunction</command:name><command:noun>DbaDbPartitionFunction</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database partition function(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database partition function(s), with supported piping from Get-DbaDbPartitionFunction.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbPartitionFunction</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbPartitionFunction</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbPartitionFunction.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.PartitionFunction[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.PartitionFunction[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbPartitionFunction.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.PartitionFunction[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.PartitionFunction[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PartitionFunction, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbPartitionFunction -SqlInstance localhost, sql2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> Removes partition functions from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionFunction -SqlInstance SRV1 | Out-GridView -Title 'Select partition function(s) to drop' -OutputMode Multiple | Remove-DbaDbPartitionFunction </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all partition functions on SRV1, lets the user select those to remove and then removes the selected partition functions. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbPartitionFunction</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbPartitionScheme</command:name><command:noun>DbaDbPartitionScheme</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database partition scheme(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database partition scheme(s), with supported piping from Get-DbaDbPartitionScheme.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbPartitionScheme</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbPartitionScheme</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbPartitionScheme.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.PartitionScheme[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.PartitionScheme[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbPartitionScheme.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.PartitionScheme[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.PartitionScheme[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PartitionScheme, Partition, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbPartitionScheme -SqlInstance localhost, sql2016 -Database db1, db2 </dev:code><dev:remarks><maml:para> Removes partition schemes from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbPartitionScheme -SqlInstance SRV1 | Out-GridView -Title 'Select partition scheme(s) to drop' -OutputMode Multiple | Remove-DbaDbPartitionScheme </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all partition schemes on SRV1, lets the user select those to remove and then removes the selected partition schemes. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbPartitionScheme</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbRole</command:name><command:noun>DbaDbRole</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database role from database(s) for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Remove-DbaDbRole removes role(s) from database(s) for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbRole</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDbs</maml:name><maml:description><maml:para>If this switch is enabled, roles can be removed from system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeRole</maml:name><maml:description><maml:para>The role(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSystemDbs</maml:name><maml:description><maml:para>If this switch is enabled, roles can be removed from system databases.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process. If unspecified, all roles will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role Author: Ben Miller (@DBAduck) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbRole -SqlInstance localhost -Database dbname -Role "customrole1", "customrole2" </dev:code><dev:remarks><maml:para> Removes roles customrole1 and customrole2 from the database dbname on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbRole -SqlInstance localhost, sql2016 -Database db1, db2 -Role role1, role2, role3 </dev:code><dev:remarks><maml:para> Removes role1,role2,role3 from db1 and db2 on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Remove-DbaDbRole -Database db1, db2 -Role role1 Removes role1 from db1 and db2 on the servers in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost, sql2016 -Database db1, db2 -Role role1, role2, role3 </dev:code><dev:remarks><maml:para> PS C:\> $roles | Remove-DbaDbRole Removes role1,role2,role3 from db1 and db2 on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbRoleMember</command:name><command:noun>DbaDbRoleMember</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a Database User from a database role for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Remove-DbaDbRoleMember removes users in a database from a database role or roles for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbRoleMember</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>The user(s) to remove from the role(s) specified.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbRole or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>The user(s) to remove from the role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, User Author: Ben Miller (@DBAduck) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbRoleMember -SqlInstance localhost -Database mydb -Role db_owner -User user1 </dev:code><dev:remarks><maml:para> Removes user1 from the role db_owner in the database mydb on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbRoleMember -SqlInstance localhost, sql2016 -Role SqlAgentOperatorRole -User user1 -Database msdb </dev:code><dev:remarks><maml:para> Removes user1 in servers localhost and sql2016 in the msdb database from the SqlAgentOperatorRole </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Remove-DbaDbRoleMember -Role SqlAgentOperatorRole -User user1 -Database msdb Removes user1 from the SqlAgentOperatorRole in the msdb database in every server in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $db = Get-DbaDataabse -SqlInstance localhost -Database DEMODB </dev:code><dev:remarks><maml:para> PS C:\> $db | Remove-DbaDbRoleMember -Role "db_datareader","db_datawriter" -User user1 Removes user1 in the database DEMODB on the server localhost from the roles db_datareader and db_datawriter </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost -Role "db_datareader","db_datawriter" </dev:code><dev:remarks><maml:para> PS C:\> $roles | Remove-DbaDbRoleMember -User user1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbSchema</command:name><command:noun>DbaDbSchema</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drops one or more schemas from the specified database(s).</maml:para></maml:description></command:details><maml:description><maml:para>Drops one or more schemas from the specified database(s). As noted in the remarks section of the documentation for DROP SCHEMA there must not be any objects in the schema.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbSchema</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Schema, Database Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSchema -SqlInstance sqldev01 -Database example1 -Schema TestSchema1 </dev:code><dev:remarks><maml:para> Removes the TestSchema1 schema in the example1 database in the sqldev01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01, sqldev02 -Database example1 | Remove-DbaDbSchema -Schema TestSchema1, TestSchema2 </dev:code><dev:remarks><maml:para> Passes in the example1 db via pipeline and removes the TestSchema1 and TestSchema2 schemas. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbSchema</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbSequence</command:name><command:noun>DbaDbSequence</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes sequences.</maml:para></maml:description></command:details><maml:description><maml:para>Removes the sequences that have passed through the pipeline.</maml:para><maml:para>If not used with a pipeline, Get-DbaDbSequence will be executed with the parameters provided</maml:para><maml:para>and the returned sequences will be removed.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbSequence</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name(s) of the sequence(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema for the sequence(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbSequence</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbSequence.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Sequence[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Sequence[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbSequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Sequence[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Sequence[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema for the sequence(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name(s) of the sequence(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Data, Sequence, Table Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSequence -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence </dev:code><dev:remarks><maml:para> Removes the sequence TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSequence -SqlInstance SRV1 | Out-GridView -Title 'Select sequence(s) to drop' -OutputMode Multiple | Remove-DbaDbSequence </dev:code><dev:remarks><maml:para> Using a pipeline this command gets all sequences on SRV1, lets the user select those to remove and then removes the selected sequences. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbSequence</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbSnapshot</command:name><command:noun>DbaDbSnapshot</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes database snapshots</maml:para></maml:description></command:details><maml:description><maml:para>Removes (drops) database snapshots from the server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbSnapshot</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Removes snapshots for only this specific base db</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Removes snapshots excluding this specific base dbs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Restores databases from snapshot with this name only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables input from Get-DbaDbSnapshot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSnapshots</maml:name><maml:description><maml:para>Specifies that you want to remove all snapshots from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will forcibly kill all running queries that prevent the drop process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSnapshots</maml:name><maml:description><maml:para>Specifies that you want to remove all snapshots from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Removes snapshots for only this specific base db</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Removes snapshots excluding this specific base dbs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will forcibly kill all running queries that prevent the drop process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables input from Get-DbaDbSnapshot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Restores databases from snapshot with this name only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Snapshot, Database Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snap_20161201, HR_snap_20161101 </dev:code><dev:remarks><maml:para> Removes database snapshots named HR_snap_20161201 and HR_snap_20161101 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting </dev:code><dev:remarks><maml:para> Removes all database snapshots having HR and Accounting as base dbs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting | Remove-DbaDbSnapshot </dev:code><dev:remarks><maml:para> Removes all database snapshots having HR and Accounting as base dbs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snapshot, Accounting_snapshot </dev:code><dev:remarks><maml:para> Removes HR_snapshot and Accounting_snapshot </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sql2016 | Where-Object SnapshotOf -like '*dumpsterfire*' | Remove-DbaDbSnapshot </dev:code><dev:remarks><maml:para> Removes all snapshots associated with databases that have dumpsterfire in the name </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sql2016 | Out-GridView -PassThru | Remove-DbaDbSnapshot </dev:code><dev:remarks><maml:para> Allows the selection of snapshots on sql2016 to remove </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSnapshot -SqlInstance sql2014 -AllSnapshots </dev:code><dev:remarks><maml:para> Removes all database snapshots from sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSnapshot -SqlInstance sql2014 -AllSnapshots -Confirm </dev:code><dev:remarks><maml:para> Removes all database snapshots from sql2014 and prompts for each database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbSnapshot</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbSynonym</command:name><command:noun>DbaDbSynonym</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes synonym(s) from database(s) / instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>The Remove-DbaDbSynonym removes synonym(s) from database(s) / instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbSynonym</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym(s) to process. If unspecified, all synonyms will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSynonym</maml:name><maml:description><maml:para>The synonym(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbSynonym or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSynonym</maml:name><maml:description><maml:para>The synonym(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDbSynonym or Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Synonym</maml:name><maml:description><maml:para>The synonym(s) to process. If unspecified, all synonyms will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Synonym, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSynonym -SqlInstance localhost -Database db1 -Synonym "synonym1", "synonym2" </dev:code><dev:remarks><maml:para> Removes synonyms synonym1 and synonym2 from the database db1 on the local default SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbSynonym -SqlInstance localhost, sql2016 -Database db1, db2 -Synonym synonym1, synonym2, synonym3 </dev:code><dev:remarks><maml:para> Removes synonym1, synonym2, synonym3 from db1 and db2 on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Remove-DbaDbSynonym -Database db1, db2 -Synonym synonym1 Removes synonym1 from db1 and db2 on the servers in C:\servers.txt </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $synonyms = Get-DbaDbSynonym -SqlInstance localhost, sql2016 -Database db1, db2 -Synonym synonym1, synonym2, synonym3 </dev:code><dev:remarks><maml:para> PS C:\> $synonyms | Remove-DbaDbSynonym Removes synonym1, synonym2, synonym3 from db1 and db2 on the local and sql2016 SQL Server instances </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbSynonym</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbTable</command:name><command:noun>DbaDbTable</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes database table(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes database table(s), with supported piping from Get-DbaDbTable.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbTable</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name(s) of the table(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbTable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbTable.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Table[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Table[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name(s) of the table(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Database Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbTable -SqlInstance localhost, sql2016 -Database db1, db2 -Table table1, table2, table3 </dev:code><dev:remarks><maml:para> Removes table1, table2, table3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $tables = Get-DbaDbTable -SqlInstance localhost, sql2016 -Database db1, db2 -Table table1, table2, table3 </dev:code><dev:remarks><maml:para> PS C:\> $tables | Remove-DbaDbTable Removes table1, table2, table3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbTable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbTableData</command:name><command:noun>DbaDbTableData</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes table data using a batch technique. Databases in both on-prem SQL Server and Azure SQL Database are supported.</maml:para></maml:description></command:details><maml:description><maml:para>This command does a batch delete of table data using the technique described by Aaron Bertrand here: https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes. The main goal of this command is to ensure that the log file size is controlled while deleting data. This command can be used for doing both very large deletes or small deletes. Foreign keys are not temporarily removed, so the caller needs to perform deletes in the correct order with dependent tables or enable cascading deletes. When a database is using the full or bulk_logged recovery model this command will take log backups at the end of each batch if the -LogBackupPath or -AzureBaseUrl param is specified. If the database is using the simple recovery model then CHECKPOINTs will be performed for on-prem SQL Server databases. The object returned will contain metadata about the batch deletion process including the log backup details.</maml:para><maml:para>There are two categories of use cases for this command:</maml:para><maml:para>1. Simplistic deletions from a table. In this scenario use the -Table and -BatchSize parameters. The DELETE statement is auto-generated by the this command.</maml:para><maml:para>2. Complex deletions based on a join, where clause, or an order by clause. In this scenario use the -DeleteSql parameter to specify the DELETE statement.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbTableData</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The number of rows to delete per batch. This param is defaulted to 100000 and limited to a value between 1 and 1000000000 (1 billion). This param can only be used with the -Table param. If -DeleteSql is used the TOP (N) clause must be specified in the SQL DELETE string. Note: for Azure SQL databases error 40552 could occur for large batch deletions: https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-errors-issues#error-40552-the-session-has-been-terminated-because-of-excessive-transaction-log-space-usage</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name of the table that data should be deleted. This param is required except when -DeleteSql is specified. When this param is used the -BatchSize param may also be used (or its default value).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteSql</maml:name><maml:description><maml:para>A SQL DELETE statement to be used in the command's loop for more advanced scenarios such as deleting based on a join, using a where clause, or using an order by clause (or a combination of all of those). It is required that the DELETE statement include the TOP (N) clause. See the example below. This param may be used instead of -Table and -BatchSize.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogBackupPath</maml:name><maml:description><maml:para>The directory to store the log backups. This command creates log backups when the database is using the full or bulk_logged recovery models and is an on-prem SQL server instance. If this param is not provided the command will not take log backups. This directory should be writeable by the SQL Server service account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogBackupTimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps the log backup files using the format yyyyMMddHHmm. The timestamp format should be defined using the Get-Date formats, because illegal formats will cause an error to be thrown.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>Used for log backups. See https://dbatools.io/Backup-DbaDatabase for information on this parameter. This function invokes Backup-DbaDatabase with -AzureBaseUrl if it is provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Used for log backups. See https://dbatools.io/Backup-DbaDatabase for information on this parameter. This function invokes Backup-DbaDatabase with -AzureCredential if it is provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input of Microsoft.SqlServer.Management.Smo.Database, Microsoft.SqlServer.Management.Smo.Server, and Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureBaseUrl</maml:name><maml:description><maml:para>Used for log backups. See https://dbatools.io/Backup-DbaDatabase for information on this parameter. This function invokes Backup-DbaDatabase with -AzureBaseUrl if it is provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Used for log backups. See https://dbatools.io/Backup-DbaDatabase for information on this parameter. This function invokes Backup-DbaDatabase with -AzureCredential if it is provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The number of rows to delete per batch. This param is defaulted to 100000 and limited to a value between 1 and 1000000000 (1 billion). This param can only be used with the -Table param. If -DeleteSql is used the TOP (N) clause must be specified in the SQL DELETE string. Note: for Azure SQL databases error 40552 could occur for large batch deletions: https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-errors-issues#error-40552-the-session-has-been-terminated-because-of-excessive-transaction-log-space-usage</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteSql</maml:name><maml:description><maml:para>A SQL DELETE statement to be used in the command's loop for more advanced scenarios such as deleting based on a join, using a where clause, or using an order by clause (or a combination of all of those). It is required that the DELETE statement include the TOP (N) clause. See the example below. This param may be used instead of -Table and -BatchSize.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input of Microsoft.SqlServer.Management.Smo.Database, Microsoft.SqlServer.Management.Smo.Server, and Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogBackupPath</maml:name><maml:description><maml:para>The directory to store the log backups. This command creates log backups when the database is using the full or bulk_logged recovery models and is an on-prem SQL server instance. If this param is not provided the command will not take log backups. This directory should be writeable by the SQL Server service account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogBackupTimeStampFormat</maml:name><maml:description><maml:para>By default the command timestamps the log backup files using the format yyyyMMddHHmm. The timestamp format should be defined using the Get-Date formats, because illegal formats will cause an error to be thrown.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name of the table that data should be deleted. This param is required except when -DeleteSql is specified. When this param is used the -BatchSize param may also be used (or its default value).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data Author: Adam Lancaster, github.com/lancasteradam Website: https://dbatools.io Copyright: (c) 2020 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Reference material used: https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes by Aaron Bertrand </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbTableData -SqlInstance localhost -Database TestDb -Table dbo.Test -BatchSize 1000000 -LogBackupPath E:\LogBackups -Confirm:$false </dev:code><dev:remarks><maml:para> Removes all data from the dbo.Test table in the TestDb database on the local SQL instance. The deletes are done in batches of 1000000 rows each and the log backups are written to E:\LogBackups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbTableData -SqlInstance localhost -Database TestDb -DeleteSql "DELETE TOP (1000000) deleteFromTable FROM dbo.Test deleteFromTable LEFT JOIN dbo.Test2 b ON deleteFromTable.Id = b.Id" -LogBackupPath E:\LogBackups -Confirm:$false </dev:code><dev:remarks><maml:para> Removes data from the dbo.Test table in the TestDb database on the local SQL instance. When specifying -DeleteSql the DELETE statement needs to specify the TOP (N) clause. In this example the deletes are done in batches of 1000000 rows each and the log backups are written to E:\LogBackups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbTableData -SqlInstance localhost -Database TestDb -Table dbo.Test -DeleteSql "WITH ToDelete AS (SELECT TOP (1000000) Id FROM dbo.Test ORDER BY Id DESC;) DELETE FROM ToDelete;" -LogBackupPath E:\LogBackups -Confirm:$false </dev:code><dev:remarks><maml:para> Removes data from the dbo.Test table based on the DELETE statement specified in the -DeleteSql. The deletes occur in the TestDb database on the local SQL instance. The deletes are done in batches of 1000000 rows each and the log backups are written to E:\LogBackups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -Database TestDb1, TestDb2 | Remove-DbaDbTableData -Table dbo.Test -BatchSize 1000000 -LogBackupPath E:\LogBackups -Confirm:$false </dev:code><dev:remarks><maml:para> Removes data from the dbo.Test table in the TestDb1 and TestDb2 databases on the local SQL instance. The deletes are done in batches of 1000000 rows each and the log backups are written to E:\LogBackups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server, $server2 | Remove-DbaDbTableData -Database TestDb -Table dbo.Test -BatchSize 1000000 -LogBackupPath E:\LogBackups -Confirm:$false </dev:code><dev:remarks><maml:para> Removes data from the dbo.Test table in the TestDb database on the SQL instances represented by $server and $server2. The deletes are done in batches of 1000000 rows each and the log backups are written to E:\LogBackups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -ConnectionString "Data Source=TCP:yourserver.database.windows.net,1433;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;User Id=dbuser;Password=strongpassword;Database=TestDb" </dev:code><dev:remarks><maml:para> Remove-DbaDbTableData -SqlInstance $server -Database TestDb -Table dbo.Test -BatchSize 1000000 -Confirm:$false Removes data from the dbo.Test table in the TestDb database on the Azure SQL server yourserver.database.windows.net. The deletes are done in batches of 1000000 rows. Log backups are managed by Azure SQL. Note: for Azure SQL databases error 40552 could occur for large batch deletions: https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-errors-issues#error-40552-the-session-has-been-terminated-because-of-excessive-transaction-log-space-usage </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbTableData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbUdf</command:name><command:noun>DbaDbUdf</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database user defined function(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database user defined function(s), with supported piping from Get-DbaDbUdf.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbUdf</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUdf</maml:name><maml:description><maml:para>This switch removes all system objects from the UDF collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name(s) of the user defined functions to process. If unspecified, all user defined functions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>The name(s) of the user defined functions to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbUdf</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbUdf.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.UserDefinedFunction[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.UserDefinedFunction[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeName</maml:name><maml:description><maml:para>The name(s) of the user defined functions to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSchema</maml:name><maml:description><maml:para>The schema(s) to exclude.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystemUdf</maml:name><maml:description><maml:para>This switch removes all system objects from the UDF collection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbUdf.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.UserDefinedFunction[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.UserDefinedFunction[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name(s) of the user defined functions to process. If unspecified, all user defined functions will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The schema(s) to process. If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Udf, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbUdf -SqlInstance localhost, sql2016 -Database db1, db2 -Name udf1, udf2, udf3 </dev:code><dev:remarks><maml:para> Removes udf1, udf2, udf3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $udfs = Get-DbaDbUdf -SqlInstance localhost, sql2016 -Database db1, db2 -Name udf1, udf2, udf3 </dev:code><dev:remarks><maml:para> PS C:\> $udfs | Remove-DbaDbUdf Removes udf1, udf2, udf3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbUdf</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbUser</command:name><command:noun>DbaDbUser</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drop database user</maml:para></maml:description></command:details><maml:description><maml:para>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</maml:para><maml:para>dropped. If user owns more than one schema, the owner of the schemas that does not have the same name as the user, will be</maml:para><maml:para>changed to 'dbo'. If schemas have underlying objects, you must specify the -Force parameter so the user can be dropped.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbUser</maml:name><command:parameter required="true" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the list of users to remove.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If enabled this will force the change of the owner to 'dbo' for any schema which owner is the User.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbUser</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Support piping from Get-DbaDbUser.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.User[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.User[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If enabled this will force the change of the owner to 'dbo' for any schema which owner is the User.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If enabled this will force the change of the owner to 'dbo' for any schema which owner is the User.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Support piping from Get-DbaDbUser.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.User[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.User[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>Specifies the list of users to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: User Author: Doug Meyers (@dgmyrs) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbUser -SqlInstance sqlserver2014 -User user1 </dev:code><dev:remarks><maml:para> Drops user1 from all databases it exists in on server 'sqlserver2014'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbUser -SqlInstance sqlserver2014 -Database database1 -User user1 </dev:code><dev:remarks><maml:para> Drops user1 from the database1 database on server 'sqlserver2014'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbUser -SqlInstance sqlserver2014 -ExcludeDatabase model -User user1 </dev:code><dev:remarks><maml:para> Drops user1 from all databases it exists in on server 'sqlserver2014' except for the model database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbUser sqlserver2014 | Where-Object Name -In "user1" | Remove-DbaDbUser </dev:code><dev:remarks><maml:para> Drops user1 from all databases it exists in on server 'sqlserver2014'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaDbView</command:name><command:noun>DbaDbView</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a database view(s) from each database and SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a database view(s), with supported piping from Get-DbaDbView.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaDbView</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>The name(s) of the view(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaDbView</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbView.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.View[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.View[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDbView.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.View[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.View[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>View</maml:name><maml:description><maml:para>The name(s) of the view(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: View, Database Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaDbView -SqlInstance localhost, sql2016 -Database db1, db2 -View view1, view2, view3 </dev:code><dev:remarks><maml:para> Removes view1, view2, view3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $views = Get-DbaDbView -SqlInstance localhost, sql2016 -Database db1, db2 -View view1, view2, view3 </dev:code><dev:remarks><maml:para> PS C:\> $views | Remove-DbaDbView Removes view1, view2, view3 from db1 and db2 on the local and sql2016 SQL Server instances. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaDbView</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes endpoints from a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Removes endpoints from a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaEndpoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only remove specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Remove all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Remove all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only remove specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaEndpoint -SqlInstance sqlserver2012 -AllEndpoints </dev:code><dev:remarks><maml:para> Removes all endpoints on the sqlserver2014 instance. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1,endpoint2 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the endpoint1 and endpoint2 endpoints. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1 | Remove-DbaEndpoint </dev:code><dev:remarks><maml:para> Removes the endpoints returned from the Get-DbaEndpoint function. Prompts for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaExtendedProperty</command:name><command:noun>DbaExtendedProperty</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drops an extended property</maml:para></maml:description></command:details><maml:description><maml:para>Drops an extended property</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaExtendedProperty</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaExtendedProperty</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaExtendedProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: extendedproperties Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -Database mydb | Get-DbaExtendedProperty -Name appversion | Remove-DbaExtendedProperty </dev:code><dev:remarks><maml:para> Removes the appversion extended property from the mydb database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance localhost -Database mydb -Table mytable | Get-DbaExtendedProperty -Name appversion | Remove-DbaExtendedProperty -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the appversion extended property on the mytable table of the mydb database and does not prompt for confirmation </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaExtendedProperty</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaFirewallRule</command:name><command:noun>DbaFirewallRule</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes firewall rules for SQL Server instances from the target computer.</maml:para></maml:description></command:details><maml:description><maml:para>Removes firewall rules for SQL Server instances from the target computer.</maml:para><maml:para>As the group and the names of the firewall rules are fixed, this command</maml:para><maml:para>only works for rules created with New-DbaFirewallRule.</maml:para><maml:para>This is basically a wrapper around Remove-NetFirewallRule executed at the target computer.</maml:para><maml:para>So this only works if Remove-NetFirewallRule works on the target computer.</maml:para><maml:para>The functionality is currently limited. Help to extend the functionality is welcome.</maml:para><maml:para>As long as you can read this note here, there may be breaking changes in future versions.</maml:para><maml:para>So please review your scripts using this command after updating dbatools.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaFirewallRule</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Removes firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) * AllInstance - for all firewall rules on the target computer related to SQL Server The default is @('Engine', 'DAC'). As the Browser might be needed by other instances, the firewall rule for the SQL Server Browser is never removed with the firewall rule of the instance but only removed if 'Browser' is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaFirewallRule</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The output object(s) from Get-DbaFirewallRule.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The output object(s) from Get-DbaFirewallRule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Removes firewall rules for the given type(s). Valid values are: * Engine - for the SQL Server instance * Browser - for the SQL Server Browser * DAC - for the dedicated admin connection (DAC) * AllInstance - for all firewall rules on the target computer related to SQL Server The default is @('Engine', 'DAC'). As the Browser might be needed by other instances, the firewall rule for the SQL Server Browser is never removed with the firewall rule of the instance but only removed if 'Browser' is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Firewall, Network, Connection Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaFirewallRule -SqlInstance SRV1 </dev:code><dev:remarks><maml:para> Removes the firewall rule for the default instance on SRV1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaFirewallRule -SqlInstance SRV1\SQL2016 -Type Engine, Browser </dev:code><dev:remarks><maml:para> Removes the firewall rule for the instance SQL2016 on SRV1 and the firewall rule for the SQL Server Browser. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaFirewallRule -SqlInstance SRV1 -Type AllInstance | Where-Object Type -eq 'Engine' | Remove-DbaFirewallRule </dev:code><dev:remarks><maml:para> Removes the firewall rules for all instance from SRV1. Leaves the firewall rule for the SQL Server Browser in place. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaFirewallRule -SqlInstance SRV1 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the firewall rule for the default instance on SRV1. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaFirewallRule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaLinkedServer</command:name><command:noun>DbaLinkedServer</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a linked server.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a linked server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaLinkedServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance and Get-DbaLinkedServer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drops the linked server login(s) associated with the linked server and then drops the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Drops the linked server login(s) associated with the linked server and then drops the linked server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance and Get-DbaLinkedServer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer, Server Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the linked server "linkedServer1" from the sql01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 -Confirm:$false -Force </dev:code><dev:remarks><maml:para> Removes the linked server "linkedServer1" and the associated linked server logins from the sql01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $linkedServer1 = Get-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 </dev:code><dev:remarks><maml:para> PS C:\>$linkedServer1 | Remove-DbaLinkedServer -Confirm:$false Passes in a linked server via pipeline and removes it from the sql01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Connect-DbaInstance -SqlInstance sql01 | Remove-DbaLinkedServer -LinkedServer linkedServer1 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the linked server "linkedServer1" from the sql01 instance, which is passed in via pipeline. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaLinkedServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaLinkedServerLogin</command:name><command:noun>DbaLinkedServerLogin</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a linked server login.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a linked server login.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaLinkedServerLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance, Get-DbaLinkedServer, and Get-DbaLinkedServerLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Connect-DbaInstance, Get-DbaLinkedServer, and Get-DbaLinkedServerLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LinkedServer</maml:name><maml:description><maml:para>The name(s) of the linked server(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalLogin</maml:name><maml:description><maml:para>The name(s) of the linked server login(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Security, Server Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the linkedServerLogin1 from the linkedServer1 linked server on the sql01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $instance = Connect-DbaInstance -SqlInstance sql01 </dev:code><dev:remarks><maml:para> PS C:\>$instance | Remove-DbaLinkedServerLogin -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1 -Confirm:$false Passes in a SqlInstance via pipeline and removes the linkedServerLogin1 from the linkedServer1 linked server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $linkedServer1 = Get-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1 </dev:code><dev:remarks><maml:para> PS C:\>$linkedServer1 | Remove-DbaLinkedServerLogin -LocalLogin linkedServerLogin1 -Confirm:$false Passes in a linked server via pipeline and removes the linkedServerLogin1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $linkedServerLogin1 = Get-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1 </dev:code><dev:remarks><maml:para> PS C:\>$linkedServerLogin1 | Remove-DbaLinkedServerLogin -Confirm:$false Passes in a linked server login via pipeline and removes it. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaLinkedServerLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Drops a Login</maml:para></maml:description></command:details><maml:description><maml:para>Tries a bunch of different ways to remove a Login or two or more.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaLogin</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any sessions associated with the login prior to drop</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaLogin</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login(s) to process - this list is auto-populated from the server. If unspecified, all Logins will be processed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any sessions associated with the login prior to drop</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaLogin</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of Logins (such as returned by Get-DbaLogin), to be removed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any sessions associated with the login prior to drop</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any sessions associated with the login prior to drop</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of Logins (such as returned by Get-DbaLogin), to be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The Login(s) to process - this list is auto-populated from the server. If unspecified, all Logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Delete, Login Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLogin -SqlInstance sql2016 -Login mylogin </dev:code><dev:remarks><maml:para> Prompts then removes the Login mylogin on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLogin -SqlInstance sql2016 -Login mylogin, yourlogin </dev:code><dev:remarks><maml:para> Prompts then removes the Logins mylogin and yourlogin on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaLogin -SqlInstance sql2016 -Login mylogin -Confirm:$false </dev:code><dev:remarks><maml:para> Does not prompt and swiftly removes mylogin on SQL Server sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance server\instance -Login yourlogin | Remove-DbaLogin </dev:code><dev:remarks><maml:para> Removes mylogin on SQL Server server\instance </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaNetworkCertificate</command:name><command:noun>DbaNetworkCertificate</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes the network certificate for SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Removes the network certificate for SQL Server instance. This setting is found in Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaNetworkCertificate</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify InstanceClusterName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must also specify InstanceClusterName (see below)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaNetworkCertificate </dev:code><dev:remarks><maml:para> Removes the Network Certificate for the default instance (MSSQLSERVER) on localhost </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaNetworkCertificate -SqlInstance sql1\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Removes the Network Certificate for the SQL2008R2SP2 instance on sql1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaNetworkCertificate -SqlInstance localhost\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were run </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaNetworkCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaPfDataCollectorCounter</command:name><command:noun>DbaPfDataCollectorCounter</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a Performance Data Collector Counter.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a Performance Data Collector Counter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaPfDataCollectorCounter</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the target computer using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to search.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The name of the Collector to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The name of the Counter - in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Collector</maml:name><maml:description><maml:para>The name of the Collector to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to search.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Counter</maml:name><maml:description><maml:para>The name of the Counter - in the form of '\Processor(_Total)\% Processor Time'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the target computer using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PerfMon Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaPfDataCollectorCounter -ComputerName sql2017 -CollectorSet 'System Correlation' -Collector DataCollector01 -Counter '\LogicalDisk(*)\Avg. Disk Queue Length' </dev:code><dev:remarks><maml:para> Prompts for confirmation then removes the '\LogicalDisk(*)\Avg. Disk Queue Length' counter within the DataCollector01 collector within the System Correlation collector set on sql2017. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorCounter | Out-GridView -PassThru | Remove-DbaPfDataCollectorCounter -Confirm:$false </dev:code><dev:remarks><maml:para> Allows you to select which counters you'd like on localhost and does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaPfDataCollectorCounter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaPfDataCollectorSet</command:name><command:noun>DbaPfDataCollectorSet</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a Performance Monitor Data Collector Set</maml:para></maml:description></command:details><maml:description><maml:para>Removes a Performance Monitor Data Collector Set. When removing data collector sets from the local instance, Run As Admin is required.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaPfDataCollectorSet</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the target computer using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the target computer using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PerfMon Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Prompts for confirmation then removes all ready Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaPfDataCollectorSet -ComputerName sql2017 -Confirm:$false </dev:code><dev:remarks><maml:para> Attempts to remove all ready Collectors on localhost and does not prompt to confirm. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Prompts for confirmation then removes the 'System Correlation' Collector on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Remove-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Removes the 'System Correlation' Collector. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Stop-DbaPfDataCollectorSet | Remove-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Stops and removes the 'System Correlation' Collector. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaPfDataCollectorSet</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaRegServer</command:name><command:noun>DbaRegServer</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes registered servers found in SQL Server Central Management Server (CMS).</maml:para></maml:description></command:details><maml:description><maml:para>Removes registered servers found in SQL Server Central Management Server (CMS).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaRegServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more names to include. Name is the visible name in SSMS CMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more server names to include. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServer to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Group</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServer to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more names to include. Name is the visible name in SSMS CMS interface (labeled Registered Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>Specifies one or more server names to include. Server Name is the actual instance name (labeled Server Name)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRegServer -SqlInstance sql2012 -Group HR, Accounting </dev:code><dev:remarks><maml:para> Removes all servers from the HR and Accounting groups on sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRegServer -SqlInstance sql2012 -Group HR\Development </dev:code><dev:remarks><maml:para> Removes all servers from the HR and sub-group Development from the CMS on sql2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRegServer -SqlInstance sql2012 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes all registered servers on sql2012 and turns off all prompting </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaRegServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaRegServerGroup</command:name><command:noun>DbaRegServerGroup</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Gets list of Server Groups objects stored in SQL Server Central Management Server (CMS).</maml:para></maml:description></command:details><maml:description><maml:para>Returns an array of Server Groups found in the CMS.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaRegServerGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows results from Get-DbaRegServerGroup to be piped in</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Specifies one or more groups to include from SQL Server Central Management Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RegisteredServer, CMS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRegServerGroup -SqlInstance sql2012 -Group HR, Accounting </dev:code><dev:remarks><maml:para> Removes the HR and Accounting groups on sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRegServerGroup -SqlInstance sql2012 -Group HR\Development -Confirm:$false </dev:code><dev:remarks><maml:para> Removes the Development subgroup within the HR group on sql2012 and turns off all prompting </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaRegServerGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaRgResourcePool</command:name><command:noun>DbaRgResourcePool</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a resource pool from the Resource Governor on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a resource pool from the Resource Governor on the specified SQL Server.</maml:para><maml:para>A resource pool represents a subset of the physical resources (memory, CPUs and IO) of an instance of the Database Engine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaRgResourcePool</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourcePool, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRgResourcePool -SqlInstance sql2016 -ResourcePool "poolAdmin" -Type Internal </dev:code><dev:remarks><maml:para> Removes an internal resource pool named "poolAdmin" for the instance sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgResourcePool -SqlInstance sql2016 -Type "Internal" | Where-Object { $_.IsSystemObject -eq $false } | Remove-DbaRgResourcePool </dev:code><dev:remarks><maml:para> Removes all user internal resource pools for the instance sql2016 by piping output from Get-DbaRgResourcePool. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaRgResourcePool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaRgWorkloadGroup</command:name><command:noun>DbaRgWorkloadGroup</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes a workload group from the Resource Governor on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Removes a workload group from the Resource Governor on the specified SQL Server.</maml:para><maml:para>A workload group represents a subset of the resources of an instance of the Database Engine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaRgWorkloadGroup</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool the workload group is in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgWorkloadGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgWorkloadGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool the workload group is in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WorkloadGroup, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRgResourcePool -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -ResourcePool "poolAdmin" -ResourcePoolType Internal </dev:code><dev:remarks><maml:para> Removes a workload group named "groupAdmin" in the "poolAdmin" resource pool for the instance sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaRgResourcePool -SqlInstance sql2016 -WorkloadGroup "groupAdmin" </dev:code><dev:remarks><maml:para> Removes a workload group named "groupAdmin" in the default resource pool for the instance sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaRgWorkloadGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaServerRole</command:name><command:noun>DbaServerRole</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Deletes specified server-level role.</maml:para></maml:description></command:details><maml:description><maml:para>Deletes specified server-level role.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaServerRole</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-role that will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped server-role objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ServerRole[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ServerRole[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped server-role objects.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ServerRole[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ServerRole[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-role that will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, Login Author: Claudio Silva (@ClaudioESSilva), claudioessilva.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRole -SqlInstance Server1 -ServerRole 'serverExecuter' </dev:code><dev:remarks><maml:para> Server-role 'serverExecuter' on Server1 will be removed if it exists. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRole -SqlInstance Server1 -ServerRole 'serverExecuter' -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to remove the server-role 'serverExecuter' on 'Server1'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaServerRole</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaServerRoleMember</command:name><command:noun>DbaServerRoleMember</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes login(s) from a server-level role(s) for each instance(s) of SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Removes login(s) from a server-level role(s) for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaServerRoleMember</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-level role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to remove from server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to remove from server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaServerRole.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaServerRole.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to remove from server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Role</maml:name><maml:description><maml:para>The role(s) to remove from server-level role(s) specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerRole</maml:name><maml:description><maml:para>The server-level role(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Role, Login Author: Mikey Bronowski (@MikeyBronowski), bronowski.it Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRoleMember -SqlInstance server1 -ServerRole dbcreator -Login login1 </dev:code><dev:remarks><maml:para> Removes login1 from the dbcreator fixed server-level role on the instance server1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRoleMember -SqlInstance server1, sql2016 -ServerRole customrole -Login login1 </dev:code><dev:remarks><maml:para> Removes login1 from customrole custom server-level role on the instance server1 and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRoleMember -SqlInstance server1 -ServerRole customrole -Role dbcreator </dev:code><dev:remarks><maml:para> Removes customrole custom server-level role from the dbcreator fixed server-level role. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\> $servers | Remove-DbaServerRoleMember -ServerRole sysadmin -Login login1 Removes login1 from the sysadmin fixed server-level role in every server in C:\servers.txt. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaServerRoleMember -SqlInstance localhost -ServerRole bulkadmin, dbcreator -Login login1 </dev:code><dev:remarks><maml:para> Removes login1 from the bulkadmin and dbcreator fixed server-level roles on the server localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $roles = Get-DbaServerRole -SqlInstance localhost -ServerRole bulkadmin, dbcreator </dev:code><dev:remarks><maml:para> PS C:\> $roles | Remove-DbaServerRoleMember -Login login1 Removes login1 from the bulkadmin and dbcreator fixed server-level roles on the server localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> PS C:\ $logins = Get-Content C:\logins.txt </dev:code><dev:remarks><maml:para> PS C:\ $srvLogins = Get-DbaLogin -SqlInstance server1 -Login $logins PS C:\ Remove-DbaServerRoleMember -Login $logins -ServerRole mycustomrole Removes all the logins found in C:\logins.txt from mycustomrole custom server-level role on server1. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaServerRoleMember</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaSpn</command:name><command:noun>DbaSpn</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes an SPN for a given service account in active directory and also removes delegation to the same SPN, if found</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>In order to run this function, the credential you provide must have write access to Active Directory.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaSpn</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SPN</maml:name><maml:description><maml:para>The SPN you want to remove</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>ServiceAccount</maml:name><maml:description><maml:para>The account you want the SPN remove from</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to Active Directory to make the changes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to Active Directory to make the changes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceAccount</maml:name><maml:description><maml:para>The account you want the SPN remove from</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SPN</maml:name><maml:description><maml:para>The SPN you want to remove</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN Author: Drew Furgiuele (@pittfurg), port1433.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaSpn -SPN MSSQLSvc\SQLSERVERA.domain.something -ServiceAccount domain\account </dev:code><dev:remarks><maml:para> Connects to Active Directory and removes a provided SPN from the given account (and also the relative delegation) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaSpn -SPN MSSQLSvc\SQLSERVERA.domain.something -ServiceAccount domain\account -EnableException </dev:code><dev:remarks><maml:para> Connects to Active Directory and removes a provided SPN from the given account, suppressing all error messages and throw exceptions that can be caught instead </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaSpn -SPN MSSQLSvc\SQLSERVERA.domain.something -ServiceAccount domain\account -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Connects to Active Directory and removes a provided SPN to the given account. Uses alternative account to connect to AD. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName sql2005 | Where-Object { $_.isSet -eq $true } | Remove-DbaSpn -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen trying to remove all set SPNs for sql2005 and the relative delegations </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName sql2005 | Where-Object { $_.isSet -eq $true } | Remove-DbaSpn </dev:code><dev:remarks><maml:para> Removes all set SPNs for sql2005 and the relative delegations </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaSpn</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaTrace</command:name><command:noun>DbaTrace</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Stops and closes the specified trace and deletes its definition from the server.</maml:para></maml:description></command:details><maml:description><maml:para>Stops and closes the specified trace and deletes its definition from the server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaTrace</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaTrace -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> Stops and removes all traces on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaTrace -SqlInstance sql2008 -Id 1 </dev:code><dev:remarks><maml:para> Stops and removes all trace with ID 1 on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Remove-DbaTrace </dev:code><dev:remarks><maml:para> Stops and removes selected traces on sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaTrace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes Extended Events sessions.</maml:para></maml:description></command:details><maml:description><maml:para>This script removes Extended Events sessions on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Specifies a list of Extended Events sessions to remove.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>If this switch is enabled, all Extended Events sessions will be removed except the packaged sessions AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-DbaXESession</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts a collection of XEsession objects as output by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>If this switch is enabled, all Extended Events sessions will be removed except the packaged sessions AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts a collection of XEsession objects as output by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Specifies a list of Extended Events sessions to remove.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaXESession -SqlInstance sql2012 -AllSessions </dev:code><dev:remarks><maml:para> Removes all Extended Event Session on the sqlserver2014 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Remove-DbaXESession -SqlInstance sql2012 -Session xesession1,xesession2 </dev:code><dev:remarks><maml:para> Removes the xesession1 and xesession2 Extended Event sessions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2017 | Remove-DbaXESession -Confirm:$false </dev:code><dev:remarks><maml:para> Removes all sessions from sql2017, bypassing prompts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2012 -Session xesession1 | Remove-DbaXESession </dev:code><dev:remarks><maml:para> Removes the sessions returned from the Get-DbaXESession function. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Remove-DbaXESmartTarget</command:name><command:noun>DbaXESmartTarget</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Removes XESmartTarget PowerShell jobs.</maml:para></maml:description></command:details><maml:description><maml:para>Removes XESmartTarget PowerShell jobs.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaXESmartTarget</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies one or more XESmartTarget job objects as output by Get-DbaXESmartTarget.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Specifies one or more XESmartTarget job objects as output by Get-DbaXESmartTarget.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://github.com/spaghettidba/XESmartTarget/wiki </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESmartTarget | Remove-DbaXESmartTarget </dev:code><dev:remarks><maml:para> Removes all XESmartTarget jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESmartTarget | Where-Object Id -eq 2 | Remove-DbaXESmartTarget </dev:code><dev:remarks><maml:para> Removes a specific XESmartTarget job. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaXESmartTarget</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Rename-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Rename</command:verb><maml:description><maml:para>Changes database name, logical file names, file group names and physical file names (optionally handling the move). BETA VERSION.</maml:para></maml:description></command:details><maml:description><maml:para>Can change every database metadata that can be renamed.</maml:para><maml:para>The ultimate goal is choosing to have a default template to enforce in your environment</maml:para><maml:para>so your naming convention for every bit can be put in place in no time.</maml:para><maml:para>The process is as follows (it follows the hierarchy of the entities):</maml:para><maml:para>- database name is changed (optionally, forcing users out)</maml:para><maml:para>- filegroup name(s) are changed accordingly</maml:para><maml:para>- logical name(s) are changed accordingly</maml:para><maml:para>- physical file(s) are changed accordingly</maml:para><maml:para>- if Move is specified, the database will be taken offline and the move will initiate, then it will be taken online</maml:para><maml:para>- if Move is not specified, the database remains online (unless SetOffline), and you are in charge of moving files</maml:para><maml:para>If any of the above fails, the process stops.</maml:para><maml:para>Please take a backup of your databases BEFORE using this, and remember to backup AFTER (also a FULL backup of master)</maml:para><maml:para>It returns an object for each database with all the renames done, plus hidden properties showing a "human" representation of them.</maml:para><maml:para>It's better you store the resulting object in a variable so you can inspect it in case of issues, e.g. "$result = Rename-DbaDatabase ....."</maml:para><maml:para>To get a grasp without worrying of what would happen under the hood, use "Rename-DbaDatabase .... -Preview | Select-Object *"</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Rename-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their build state.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Targets only specified databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes only specified databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If you want to apply the naming convention system wide, you need to pass this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Pass a template to rename the database name. Valid placeholders are: - <DBN> current database name - <DATE> date (yyyyMMdd)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroupName</maml:name><maml:description><maml:para>Pass a template to rename file group name. Valid placeholders are: - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogicalName</maml:name><maml:description><maml:para>Pass a template to rename logical name. Valid placeholders are: - <FT> file type (ROWS, LOG) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileName</maml:name><maml:description><maml:para>Pass a template to rename file name. Valid placeholders are: - <FNN> current file name (the basename, without directory nor extension) - <FT> file type (ROWS, LOG, MMO, FS) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceBefore</maml:name><maml:description><maml:para>If you pass this switch, all upper level "current names" will be inspected and replaced BEFORE doing the rename according to the template in the current level (remember the hierarchy): Let's say you have a database named "dbatools_HR", composed by 3 files - dbatools_HR_Data.mdf - dbatools_HR_Index.ndf - dbatools_HR_log.ldf Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' would end up with this logic: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified <DBN><FNN> --> current database name + current filename" - dbatools_HR_Data.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVEdbatools_HR_log.ldf Passing this switch, instead, e.g. Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' -ReplaceBefore end up with this logic instead: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified, <DBN><FNN>, plus -ReplaceBefore --> current database name + replace OLD "upper level" names inside the current filename - dbatools_HR_Data.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVE_log.ldf</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any open session to be able to do renames.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Move</maml:name><maml:description><maml:para>If you want this function to move files, else you're the one in charge of it. This enables the same functionality as SetOffline, killing open transactions and putting the database offline, then do the actual rename and setting it online again afterwards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetOffline</maml:name><maml:description><maml:para>Kills any open session and sets the database offline to be able to move files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Preview</maml:name><maml:description><maml:para>Shows the renames without performing any operation (recommended to find your way around this function parameters ;-) )</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Rename-DbaDatabase</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes only specified databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If you want to apply the naming convention system wide, you need to pass this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Pass a template to rename the database name. Valid placeholders are: - <DBN> current database name - <DATE> date (yyyyMMdd)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroupName</maml:name><maml:description><maml:para>Pass a template to rename file group name. Valid placeholders are: - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogicalName</maml:name><maml:description><maml:para>Pass a template to rename logical name. Valid placeholders are: - <FT> file type (ROWS, LOG) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileName</maml:name><maml:description><maml:para>Pass a template to rename file name. Valid placeholders are: - <FNN> current file name (the basename, without directory nor extension) - <FT> file type (ROWS, LOG, MMO, FS) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceBefore</maml:name><maml:description><maml:para>If you pass this switch, all upper level "current names" will be inspected and replaced BEFORE doing the rename according to the template in the current level (remember the hierarchy): Let's say you have a database named "dbatools_HR", composed by 3 files - dbatools_HR_Data.mdf - dbatools_HR_Index.ndf - dbatools_HR_log.ldf Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' would end up with this logic: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified <DBN><FNN> --> current database name + current filename" - dbatools_HR_Data.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVEdbatools_HR_log.ldf Passing this switch, instead, e.g. Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' -ReplaceBefore end up with this logic instead: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified, <DBN><FNN>, plus -ReplaceBefore --> current database name + replace OLD "upper level" names inside the current filename - dbatools_HR_Data.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVE_log.ldf</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any open session to be able to do renames.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Move</maml:name><maml:description><maml:para>If you want this function to move files, else you're the one in charge of it. This enables the same functionality as SetOffline, killing open transactions and putting the database offline, then do the actual rename and setting it online again afterwards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetOffline</maml:name><maml:description><maml:para>Kills any open session and sets the database offline to be able to move files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Preview</maml:name><maml:description><maml:para>Shows the renames without performing any operation (recommended to find your way around this function parameters ;-) )</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped database objects</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If you want to apply the naming convention system wide, you need to pass this parameter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Targets only specified databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Pass a template to rename the database name. Valid placeholders are: - <DBN> current database name - <DATE> date (yyyyMMdd)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Excludes only specified databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroupName</maml:name><maml:description><maml:para>Pass a template to rename file group name. Valid placeholders are: - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileName</maml:name><maml:description><maml:para>Pass a template to rename file name. Valid placeholders are: - <FNN> current file name (the basename, without directory nor extension) - <FT> file type (ROWS, LOG, MMO, FS) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Kills any open session to be able to do renames.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped database objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogicalName</maml:name><maml:description><maml:para>Pass a template to rename logical name. Valid placeholders are: - <FT> file type (ROWS, LOG) - <LGN> current logical name - <FGN> current filegroup name - <DBN> current database name - <DATE> date (yyyyMMdd) If distinct names cannot be generated, a counter will be appended (0001, 0002, 0003, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Move</maml:name><maml:description><maml:para>If you want this function to move files, else you're the one in charge of it. This enables the same functionality as SetOffline, killing open transactions and putting the database offline, then do the actual rename and setting it online again afterwards</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Preview</maml:name><maml:description><maml:para>Shows the renames without performing any operation (recommended to find your way around this function parameters ;-) )</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceBefore</maml:name><maml:description><maml:para>If you pass this switch, all upper level "current names" will be inspected and replaced BEFORE doing the rename according to the template in the current level (remember the hierarchy): Let's say you have a database named "dbatools_HR", composed by 3 files - dbatools_HR_Data.mdf - dbatools_HR_Index.ndf - dbatools_HR_log.ldf Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' would end up with this logic: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified <DBN><FNN> --> current database name + current filename" - dbatools_HR_Data.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVEdbatools_HR_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVEdbatools_HR_log.ldf Passing this switch, instead, e.g. Rename-DbaDatabase .... -Database "dbatools_HR" -DatabaseName "dbatools_HRARCHIVE" -FileName '<DBN><FNN>' -ReplaceBefore end up with this logic instead: - database --> no placeholders specified - dbatools_HR to dbatools_HRARCHIVE - filenames placeholders specified, <DBN><FNN>, plus -ReplaceBefore --> current database name + replace OLD "upper level" names inside the current filename - dbatools_HR_Data.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_Index.mdf to dbatools_HRARCHIVE_Data.mdf - dbatools_HR_log.ldf to dbatools_HRARCHIVE_log.ldf</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetOffline</maml:name><maml:description><maml:para>Kills any open session and sets the database offline to be able to move files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their build state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Rename Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName HR2 -Preview | Select-Object * </dev:code><dev:remarks><maml:para> Shows the detailed result set you'll get renaming the HR database to HR2 without doing anything </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName HR2 </dev:code><dev:remarks><maml:para> Renames the HR database to HR2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2014a -Database HR | Rename-DbaDatabase -DatabaseName HR2 </dev:code><dev:remarks><maml:para> Same as before, but with a piped database (renames the HR database to HR2) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" </dev:code><dev:remarks><maml:para> Renames the HR database to dbatools_HR </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>_<DATE>" </dev:code><dev:remarks><maml:para> Renames the HR database to dbatools_HR_20170807 (if today is 07th Aug 2017) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName "dbatools_<FGN>" </dev:code><dev:remarks><maml:para> Renames every FileGroup within HR to "dbatools_[the original FileGroup name]" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" -FileGroupName "<DBN>_<FGN>" </dev:code><dev:remarks><maml:para> Renames the HR database to "dbatools_HR", then renames every FileGroup within to "dbatools_HR_[the original FileGroup name]" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName "dbatools_<DBN>_<FGN>" </dev:code><dev:remarks><maml:para> PS C:\> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" Renames the HR database to "dbatools_HR", then renames every FileGroup within to "dbatools_HR_[the original FileGroup name]" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" -FileName "<DBN>_<FGN>_<FNN>" </dev:code><dev:remarks><maml:para> Renames the HR database to "dbatools_HR" and then all filenames as "dbatools_HR_[Name of the FileGroup]_[original_filename]" The 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" -FileName "<DBN>_<FGN>_<FNN>" -SetOffline </dev:code><dev:remarks><maml:para> Renames the HR database to "dbatools_HR" and then all filenames as "dbatools_HR_[Name of the FileGroup]_[original_filename]" The 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_<DBN>" -FileName "<DBN>_<FGN>_<FNN>" -Move </dev:code><dev:remarks><maml:para> Renames the HR database to "dbatools_HR" and then all filenames as "dbatools_HR_[Name of the FileGroup]_[original_filename]" The 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Rename-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Rename-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Rename</command:verb><maml:description><maml:para>Rename-DbaLogin will rename logins</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>It can be a pain to update all of the mappings for a specific user, this does it for you.</maml:para><maml:para>Rename-DbaLogin will rename logins and database mappings for a specified login if Force is specified.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Rename-DbaLogin</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The current Login on the server - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewLogin</maml:name><maml:description><maml:para>The new Login that you wish to use. If it is a windows user login, then the SID must match.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will attempt to rename any associated database users.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will attempt to rename any associated database users.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The current Login on the server - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewLogin</maml:name><maml:description><maml:para>The new Login that you wish to use. If it is a windows user login, then the SID must match.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Source SQL Server.You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Mitchell Hamann (@SirCaptainMitch) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaLogin -SqlInstance localhost -Login DbaToolsUser -NewLogin captain </dev:code><dev:remarks><maml:para> SQL Login Example </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaLogin -SqlInstance localhost -Login domain\oldname -NewLogin domain\newname </dev:code><dev:remarks><maml:para> Change the windowsuser login name. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Rename-DbaLogin -SqlInstance localhost -Login dbatoolsuser -NewLogin captain -WhatIf </dev:code><dev:remarks><maml:para> WhatIf Example </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Rename-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Repair-DbaDbMirror</command:name><command:noun>DbaDbMirror</command:noun><command:verb>Repair</command:verb><maml:description><maml:para>Attempts to repair a suspended or paused mirroring database.</maml:para></maml:description></command:details><maml:description><maml:para>Attempts to repair a suspended mirroring database.</maml:para><maml:para>Restarts the endpoints then sets the partner to resume. See this article for more info:</maml:para><maml:para>http://www.sqlservercentral.com/blogs/vivekssqlnotes/2016/09/03/how-to-resume-suspended-database-mirroring-in-sql-server-/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Repair-DbaDbMirror</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbMirror -SqlInstance sql2017 -Database pubs </dev:code><dev:remarks><maml:para> Attempts to repair the mirrored but suspended pubs database on sql2017. Restarts the endpoints then sets the partner to resume. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017 -Database pubs | Repair-DbaDbMirror -Confirm:$false </dev:code><dev:remarks><maml:para> Attempts to repair the mirrored but suspended pubs database on sql2017. Restarts the endpoints then sets the partner to resume. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Repair-DbaDbMirror</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Repair-DbaDbOrphanUser</command:name><command:noun>DbaDbOrphanUser</command:noun><command:verb>Repair</command:verb><maml:description><maml:para>Finds orphan users with existing login and remaps them.</maml:para></maml:description></command:details><maml:description><maml:para>An orphan user is defined by a user that does not have a matching login (Login property = "").</maml:para><maml:para>If the matching login exists it must be:</maml:para><maml:para>Enabled</maml:para><maml:para>Not a system object</maml:para><maml:para>Not locked</maml:para><maml:para>Have the same name that user</maml:para><maml:para>You can drop users that does not have their matching login by specifying the parameter -RemoveNotExisting.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Repair-DbaDbOrphanUser</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Users</maml:name><maml:description><maml:para>Specifies the list of usernames to repair.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveNotExisting</maml:name><maml:description><maml:para>If this switch is enabled, all users that do not have a matching login will be dropped from the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forces alter schema to dbo owner so users can be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Forces alter schema to dbo owner so users can be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveNotExisting</maml:name><maml:description><maml:para>If this switch is enabled, all users that do not have a matching login will be dropped from the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Users</maml:name><maml:description><maml:para>Specifies the list of usernames to repair.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Orphan Author: Claudio Silva (@ClaudioESSilva) | Simone Bizzotto (@niphlod) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Finds and repairs all orphan users of all databases present on server 'sql2005' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Finds and repair all orphan users in all databases present on server 'sqlserver2014a'. SQL credentials are used to authenticate to the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sqlserver2014a -Database db1, db2 </dev:code><dev:remarks><maml:para> Finds and repairs all orphan users in both db1 and db2 databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sqlserver2014a -Database db1 -Users OrphanUser </dev:code><dev:remarks><maml:para> Finds and repairs user 'OrphanUser' in 'db1' database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sqlserver2014a -Users OrphanUser </dev:code><dev:remarks><maml:para> Finds and repairs user 'OrphanUser' on all databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaDbOrphanUser -SqlInstance sqlserver2014a -RemoveNotExisting </dev:code><dev:remarks><maml:para> Finds all orphan users of all databases present on server 'sqlserver2014a'. Removes all users that do not have matching Logins. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Repair-DbaDbOrphanUser</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Repair-DbaInstanceName</command:name><command:noun>DbaInstanceName</command:noun><command:verb>Repair</command:verb><maml:description><maml:para>Renames @@SERVERNAME to match with the Windows name.</maml:para></maml:description></command:details><maml:description><maml:para>When a SQL Server's host OS is renamed, the SQL Server should be as well. This helps with Availability Groups and Kerberos.</maml:para><maml:para>This 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.</maml:para><maml:para>If the automatically determined new name matches the old name, the command will not run.</maml:para><maml:para>https://www.mssqltips.com/sqlservertip/2525/steps-to-change-the-server-name-for-a-sql-server-machine/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Repair-DbaInstanceName</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoFix</maml:name><maml:description><maml:para>If this switch is enabled, the repair will be performed automatically.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, most confirmation prompts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoFix</maml:name><maml:description><maml:para>If this switch is enabled, the repair will be performed automatically.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, most confirmation prompts will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN, Instance, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaInstanceName -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> Checks to see if the server name is updatable and changes the name with a number of prompts. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaInstanceName -SqlInstance sql2014 -AutoFix </dev:code><dev:remarks><maml:para> Checks to see if the server name is updatable and automatically performs the change. Replication or mirroring will be broken if necessary. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Repair-DbaInstanceName -SqlInstance sql2014 -AutoFix -Force </dev:code><dev:remarks><maml:para> Checks 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Repair-DbaInstanceName</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Reset-DbaAdmin</command:name><command:noun>DbaAdmin</command:noun><command:verb>Reset</command:verb><maml:description><maml:para>This function allows administrators to regain access to SQL Servers in the event that passwords or access was lost. Supports SQL Server 2005 and above. Windows administrator access is required.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>This 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.</maml:para><maml:para>Once the service is restarted, the following tasks are performed:</maml:para><maml:para>- Login is added if it doesn't exist</maml:para><maml:para>- If login is a Windows User, an attempt is made to ensure it exists</maml:para><maml:para>- 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.</maml:para><maml:para>- Login will be enabled and unlocked</maml:para><maml:para>- Login will be added to sysadmin role</maml:para><maml:para>If failures occur at any point, a best attempt is made to restart the SQL Server.</maml:para><maml:para>In order to make this script as portable as possible, Microsoft.Data.SqlClient and Get-WmiObject are used (as opposed to requiring the Failover Cluster Admin tools or SMO).</maml:para><maml:para>If using this function against a remote SQL Server, ensure WinRM is configured and accessible. If this is not possible, run the script locally.</maml:para><maml:para>Tested on Windows XP, 7, 8.1, Server 2012 and Windows Server Technical Preview 2.</maml:para><maml:para>Tested on SQL Server 2005 SP4 through 2016 CTP2.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Reset-DbaAdmin</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server must be 2005 and above, and can be a clustered or stand-alone instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Instead of using Login and SecurePassword, you can just pass in a credential object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>By default, the Login parameter is "sa" but any other SQL or Windows account can be specified. If a login does not currently exist, it will be added. When adding a Windows login to remote servers, ensure the SQL Server can add the login (ie, don't add WORKSTATION\Admin to remoteserver\instance. Domain users and Groups are valid input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>By default, if a SQL Login is detected, you will be prompted for a password. Use this to securely bypass the prompt.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Login(s) will be dropped and recreated on Destination. Logins that own Agent jobs cannot be dropped at this time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>By default, the Login parameter is "sa" but any other SQL or Windows account can be specified. If a login does not currently exist, it will be added. When adding a Windows login to remote servers, ensure the SQL Server can add the login (ie, don't add WORKSTATION\Admin to remoteserver\instance. Domain users and Groups are valid input.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>By default, if a SQL Login is detected, you will be prompted for a password. Use this to securely bypass the prompt.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Instead of using Login and SecurePassword, you can just pass in a credential object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server must be 2005 and above, and can be a clustered or stand-alone instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: WSMan, Instance, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: Admin access to server (not SQL Services), Remoting must be enabled and accessible if $instance is not local </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Reset-DbaAdmin -SqlInstance sqlcluster -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Prompts for password, then resets the "sqladmin" account password on sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Reset-DbaAdmin -SqlInstance sqlserver\sqlexpress -Login ad\administrator -Confirm:$false </dev:code><dev:remarks><maml:para> Adds the domain account "ad\administrator" as a sysadmin to the SQL instance. If the account already exists, it will be added to the sysadmin role. Does not prompt for a password since it is not a SQL login. Does not prompt for confirmation since -Confirm is set to $false. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Reset-DbaAdmin -SqlInstance sqlserver\sqlexpress -Login sqladmin -Force </dev:code><dev:remarks><maml:para> Skips restart confirmation, prompts for password, then adds a SQL Login "sqladmin" with sysadmin privileges. If the account already exists, it will be added to the sysadmin role and the password will be reset. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Reset-DbaAdmin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Reset-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Reset</command:verb><maml:description><maml:para>Reverts a configuration item to its default value.</maml:para></maml:description></command:details><maml:description><maml:para>This command can be used to revert a configuration item to the value it was initialized with.</maml:para><maml:para>Generally, this amounts to reverting it to its default value.</maml:para><maml:para>In order for a reset to be possible, two conditions must be met:</maml:para><maml:para>- The setting must have been initialized.</maml:para><maml:para>- The setting cannot have been enforced by policy.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Reset-DbatoolsConfig</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationItem</maml:name><maml:description><maml:para>A configuration object as returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the setting to reset, offering the maximum of precision.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Reset-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The name of the module, from which configurations should be reset. Used in conjunction with the -Name parameter to filter a specific set of items.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Used in conjunction with the -Module parameter to select which settings to reset using wildcard comparison.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationItem</maml:name><maml:description><maml:para>A configuration object as returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the setting to reset, offering the maximum of precision.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The name of the module, from which configurations should be reset. Used in conjunction with the -Name parameter to filter a specific set of items.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Used in conjunction with the -Module parameter to select which settings to reset using wildcard comparison.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Reset-DbatoolsConfig -Module MyModule </dev:code><dev:remarks><maml:para> Resets all configuration items of the MyModule to default. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig | Reset-DbatoolsConfig </dev:code><dev:remarks><maml:para> Resets ALL configuration items to default. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Reset-DbatoolsConfig -FullName MyModule.Group.Setting1 </dev:code><dev:remarks><maml:para> Resets the configuration item named 'MyModule.Group.Setting1'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Reset-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Resolve-DbaNetworkName</command:name><command:noun>DbaNetworkName</command:noun><command:verb>Resolve</command:verb><maml:description><maml:para>Returns information about the network connection of the target computer including NetBIOS name, IP Address, domain name and fully qualified domain name (FQDN).</maml:para></maml:description></command:details><maml:description><maml:para>Retrieves the IPAddress, ComputerName from one computer.</maml:para><maml:para>The object can be used to take action against its name or IPAddress.</maml:para><maml:para>First ICMP is used to test the connection, and get the connected IPAddress.</maml:para><maml:para>Multiple protocols (e.g. WMI, CIM, etc) are attempted before giving up.</maml:para><maml:para>Important: Remember that FQDN doesn't always match "ComputerName dot Domain" as AD intends.</maml:para><maml:para>There are network setup (google "disjoint domain") where AD and DNS do not match.</maml:para><maml:para>"Full computer name" (as reported by sysdm.cpl) is the only match between the two,</maml:para><maml:para>and it matches the "DNSHostName" property of the computer object stored in AD.</maml:para><maml:para>This means that the notation of FQDN that matches "ComputerName dot Domain" is incorrect</maml:para><maml:para>in those scenarios.</maml:para><maml:para>In other words, the "suffix" of the FQDN CAN be different from the AD Domain.</maml:para><maml:para>This cmdlet has been providing good results since its inception but for lack of useful</maml:para><maml:para>names some doubts may arise.</maml:para><maml:para>Let this clear the doubts:</maml:para><maml:para>- InputName: whatever has been passed in</maml:para><maml:para>- ComputerName: hostname only</maml:para><maml:para>- IPAddress: IP Address</maml:para><maml:para>- DNSHostName: hostname only, coming strictly from DNS (as reported from the calling computer)</maml:para><maml:para>- DNSDomain: domain only, coming strictly from DNS (as reported from the calling computer)</maml:para><maml:para>- Domain: domain only, coming strictly from AD (i.e. the domain the ComputerName is joined to)</maml:para><maml:para>- DNSHostEntry: Fully name as returned by DNS [System.Net.Dns]::GetHostEntry</maml:para><maml:para>- FQDN: "legacy" notation of ComputerName "dot" Domain (coming from AD)</maml:para><maml:para>- FullComputerName: Full name as configured from within the Computer (i.e. the only secure match between AD and DNS)</maml:para><maml:para>So, if you need to use something, go with FullComputerName, always, as it is the most correct in every scenario.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resolve-DbaNetworkName</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be the name of a computer, a SMO object, an IP address or a SQL Instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Turbo</maml:name><maml:description><maml:para>Resolves without accessing the server itself. Faster but may be less accurate because it relies on DNS only, so it may fail spectacularly for disjoin-domain setups. Also, everyone has its own DNS (i.e. results may vary changing the computer where the function runs)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be the name of a computer, a SMO object, an IP address or a SQL Instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Turbo</maml:name><maml:description><maml:para>Resolves without accessing the server itself. Faster but may be less accurate because it relies on DNS only, so it may fail spectacularly for disjoin-domain setups. Also, everyone has its own DNS (i.e. results may vary changing the computer where the function runs)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, Resolve Author: Klaas Vandenberghe (@PowerDBAKlaas) | Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Resolve-DbaNetworkName -ComputerName sql2014 </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Resolve-DbaNetworkName -ComputerName sql2016, sql2014 </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for sql2016 and sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Resolve-DbaNetworkName </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for all SQL Servers returned by Get-DbaRegServer </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014, sql2016\sqlexpress | Resolve-DbaNetworkName </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for all SQL Servers returned by Get-DbaRegServer </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Resolve-DbaNetworkName</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Resolve-DbaPath</command:name><command:noun>DbaPath</command:noun><command:verb>Resolve</command:verb><maml:description><maml:para>Resolves a path.</maml:para></maml:description></command:details><maml:description><maml:para>Resolves a path.</maml:para><maml:para>Will try to resolve to paths including some basic path validation and resolution.</maml:para><maml:para>Will fail if the path cannot be resolved (so an existing path must be reached at).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resolve-DbaPath</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to validate.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>Ensure the path is of the expected provider. Allows ensuring one does not operate in the wrong provider. Common providers include the filesystem, the registry or the active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleItem</maml:name><maml:description><maml:para>Ensure the path should resolve to a single path only. This may - intentionally or not - trip up wildcard paths.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewChild</maml:name><maml:description><maml:para>Assumes one wishes to create a new child item. The parent path will be resolved and must validate true. The final leaf will be treated as a leaf item that does not exist yet.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewChild</maml:name><maml:description><maml:para>Assumes one wishes to create a new child item. The parent path will be resolved and must validate true. The final leaf will be treated as a leaf item that does not exist yet.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to validate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Provider</maml:name><maml:description><maml:para>Ensure the path is of the expected provider. Allows ensuring one does not operate in the wrong provider. Common providers include the filesystem, the registry or the active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleItem</maml:name><maml:description><maml:para>Ensure the path should resolve to a single path only. This may - intentionally or not - trip up wildcard paths.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Path, Resolve, Utility Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Resolve-DbaPath -Path report.log -Provider FileSystem -NewChild -SingleItem </dev:code><dev:remarks><maml:para> Ensures the resolved path is a FileSystem path. This will resolve to the current folder and the file report.log. Will not ensure the file exists or doesn't exist. If the current path is in a different provider, it will throw an exception. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Resolve-DbaPath -Path ..\* </dev:code><dev:remarks><maml:para> This will resolve all items in the parent folder, whatever the current path or drive might be. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Resolve-DbaPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Restart-DbaService</command:name><command:noun>DbaService</command:noun><command:verb>Restart</command:verb><maml:description><maml:para>Restarts SQL Server services on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Restarts the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restart-DbaService</maml:name><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent", "Browser", "Engine", "FullText", "SSAS", "SSIS", "SSRS", "PolyBase", "Launchpad"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will stop dependent SQL Server agents when stopping Engine services.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restart-DbaService</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent", "Browser", "Engine", "FullText", "SSAS", "SSIS", "SSRS", "PolyBase", "Launchpad"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will stop dependent SQL Server agents when stopping Engine services.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will stop dependent SQL Server agents when stopping Engine services.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent", "Browser", "Engine", "FullText", "SSAS", "SSIS", "SSRS", "PolyBase", "Launchpad"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, Instance, Restart Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires Local Admin rights on destination computer(s). </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restart-DbaService -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Restarts the SQL Server related services on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3'| Get-DbaService | Restart-DbaService </dev:code><dev:remarks><maml:para> Gets the SQL Server related services on computers sql1, sql2 and sql3 and restarts them. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restart-DbaService -ComputerName sql1,sql2 -InstanceName MSSQLSERVER </dev:code><dev:remarks><maml:para> Restarts the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restart-DbaService -ComputerName $MyServers -Type SSRS </dev:code><dev:remarks><maml:para> Restarts the SQL Server related services of type "SSRS" (Reporting Services) on computers in the variable MyServers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restart-DbaService -ComputerName sql1 -Type Engine -Force </dev:code><dev:remarks><maml:para> Restarts SQL Server database engine services on sql1 forcing dependent SQL Server Agent services to restart as well. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Restart-DbaService</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Restore-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Restore</command:verb><maml:description><maml:para>Restores a SQL Server Database from a set of backup files.</maml:para></maml:description></command:details><maml:description><maml:para>Upon being passed a list of potential backups files this command will scan the files, select those that contain SQL Server</maml:para><maml:para>backup sets. It will then filter those files down to a set that can perform the requested restore, checking that we have a</maml:para><maml:para>full restore chain to the point in time requested by the caller.</maml:para><maml:para>The function defaults to working on a remote instance. This means that all paths passed in must be relative to the remote instance.</maml:para><maml:para>XpDirTree will be used to perform the file scans.</maml:para><maml:para>Various means can be used to pass in a list of files to be considered. The default is to recursively scan the folder</maml:para><maml:para>passed in.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a recursive folder scan. Accepts multiple paths separated by ','. Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Name to restore the database under. Only works with a single database restore. If multiple database are found in the provided paths then we will exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDataDirectory</maml:name><maml:description><maml:para>Path to restore the SQL Server backups to on the target instance. If only this parameter is specified, then all database files (data and log) will be restored to this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationLogDirectory</maml:name><maml:description><maml:para>Path to restore the database log files to. This parameter can only be specified alongside DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileStreamDirectory</maml:name><maml:description><maml:para>Path to restore FileStream data to. This parameter can only be specified alongside DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>Specify a DateTime object to which you want the database restored to. Default is to the latest point available in the specified backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Indicates if the databases should be recovered after last restore. Default is to recover.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>Switch indicated is the restore is allowed to replace an existing database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be restored as part of the database restore operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>XpDirTree</maml:name><maml:description><maml:para>Switch that indicated file scanning should be performed by the SQL Server instance using xp_dirtree. This will scan recursively from the passed in path. You must have sysadmin role membership on the instance for this to work.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirRecurse</maml:name><maml:description><maml:para>If specified, prevents the XpDirTree process from recursing (its default behaviour).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place. Due to the limitations of SMO, this switch cannot be combined with VeriyOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>Switch indicate that restore should be verified. Due to the limitations of SMO, this switch cannot be combined with OutputScriptOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaintenanceSolutionBackup</maml:name><maml:description><maml:para>Switch to indicate the backup files are in a folder structure as created by Ola Hallengreen's maintenance scripts. This switch enables a faster check for suitable backups. Other options require all files to be read first to ensure we have an anchoring full backup. Because we can rely on specific locations for backups performed with OlaHallengren's backup solution, we can rely on file locations.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>FileMapping</maml:name><maml:description><maml:para>A hashtable that can be used to move specific files to a location. `$FileMapping = @{'DataFile1'='c:\restoredfiles\Datafile1.mdf';'DataFile3'='d:\DataFile3.mdf'}` And files not specified in the mapping will be restored to their original location. This Parameter is exclusive with DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>This switch tells the function to ignore transaction log backups. The process will restore to the latest full or differential backup point only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>This switch tells the function to ignore differential backups. The process will restore to the latest full and onwards with transaction log backups only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseDestinationDefaultDirectories</maml:name><maml:description><maml:para>Switch that tells the restore to use the default Data and Log locations on the target server. If they don't exist, the function will try to create them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>By default, databases will be migrated to the destination Sql Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. The same structure on the SOURCE will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc). *Note, to reuse destination folder structure, specify -WithReplace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFilePrefix</maml:name><maml:description><maml:para>This value will be prefixed to ALL restored files (log and data). This is just a simple string prefix. If you want to perform more complex rename operations then please use the FileMapping parameter. This will apply to all file move options, except for FileMapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoredDatabaseNamePrefix</maml:name><maml:description><maml:para>A string which will be prefixed to the start of the restore Database's Name. Useful if restoring a copy to the same sql server for testing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustDbBackupHistory</maml:name><maml:description><maml:para>This switch can be used when piping the output of Get-DbaDbBackupHistory or Backup-DbaDatabase into this command. It allows the user to say that they trust that the output from those commands is correct, and skips the file header read portion of the process. This means a faster process, but at the risk of not knowing till halfway through the restore that something is wrong with a file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple by 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5kb,1kb,2kb,4kb,8kb,16kb,32kb or 64kb. Can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DirectoryRecurse</maml:name><maml:description><maml:para>If specified the specified directory will be recursed into (overriding the default behaviour).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>If a directory is specified the database(s) will be restored into a standby state, with the standby file placed into this directory (which must exist, and be writable by the target Sql Server instance).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified we will to attempt to recover more transaction log backups onto database(s) in Recovering or Standby states.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExecuteAs</maml:name><maml:description><maml:para>If value provided the restore will be executed under this login's context. The login must exist, and have the relevant permissions to perform the restore.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup using Storage Access Keys. If a backup path beginning http is passed in and this parameter is not specified then if a credential with a name matching the URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDbNameInFile</maml:name><maml:description><maml:para>If specified any occurrence of the original database's name in a data or log file will be replaced with the name specified in the DatabaseName parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileSuffix</maml:name><maml:description><maml:para>This value will be suffixed to ALL restored files (log and data). This is just a simple string suffix. If you want to perform more complex rename operations then please use the FileMapping parameter. This will apply to all file move options, except for FileMapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be restored as part of the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Get-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterGetBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning GetBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelectBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Select-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterSelectBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning SelectBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Format-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterFormatBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning FormatBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TestBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Test-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterTestBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning TestBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark occurs, default is to stop when mark is created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Marked point in the transaction log to stop the restore at (Mark is created via BEGIN TRANSACTION (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver15)).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (restores can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a recursive folder scan. Accepts multiple paths separated by ','. Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Name to restore the database under. Only works with a single database restore. If multiple database are found in the provided paths then we will exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place. Due to the limitations of SMO, this switch cannot be combined with VeriyOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustDbBackupHistory</maml:name><maml:description><maml:para>This switch can be used when piping the output of Get-DbaDbBackupHistory or Backup-DbaDatabase into this command. It allows the user to say that they trust that the output from those commands is correct, and skips the file header read portion of the process. This means a faster process, but at the risk of not knowing till halfway through the restore that something is wrong with a file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple by 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5kb,1kb,2kb,4kb,8kb,16kb,32kb or 64kb. Can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup using Storage Access Keys. If a backup path beginning http is passed in and this parameter is not specified then if a credential with a name matching the URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Get-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterGetBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning GetBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelectBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Select-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterSelectBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning SelectBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Format-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterFormatBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning FormatBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TestBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Test-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterTestBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning TestBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestore</maml:name><maml:description><maml:para>Passes in an object from Get-DbaSuspectPages containing suspect pages from a single database. Setting this Parameter will cause an Online Page restore if the target Instance is Enterprise Edition, or offline if not. This will involve taking a tail log backup, so you must check your restore chain once it has completed.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestoreTailFolder</maml:name><maml:description><maml:para>This parameter passes in a location for the tail log backup required for page level restore.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark occurs, default is to stop when mark is created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Marked point in the transaction log to stop the restore at (Mark is created via BEGIN TRANSACTION (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver15)).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (restores can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-DbaDatabase</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Name to restore the database under. Only works with a single database restore. If multiple database are found in the provided paths then we will exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place. Due to the limitations of SMO, this switch cannot be combined with VeriyOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup using Storage Access Keys. If a backup path beginning http is passed in and this parameter is not specified then if a credential with a name matching the URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Recover</maml:name><maml:description><maml:para>If set will perform recovery on the indicated database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Get-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterGetBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning GetBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelectBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Select-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterSelectBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning SelectBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Format-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterFormatBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning FormatBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TestBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Test-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterTestBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning TestBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark occurs, default is to stop when mark is created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Marked point in the transaction log to stop the restore at (Mark is created via BEGIN TRANSACTION (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver15)).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (restores can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential to be used if restoring from an Azure hosted backup using Storage Access Keys. If a backup path beginning http is passed in and this parameter is not specified then if a credential with a name matching the URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BlockSize</maml:name><maml:description><maml:para>Specifies the block size to use. Must be one of 0.5kb,1kb,2kb,4kb,8kb,16kb,32kb or 64kb. Can be specified in bytes. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refer to https://msdn.microsoft.com/en-us/library/ms178615.aspx for more detail.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified we will to attempt to recover more transaction log backups onto database(s) in Recovering or Standby states.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>Name to restore the database under. Only works with a single database restore. If multiple database are found in the provided paths then we will exit.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationDataDirectory</maml:name><maml:description><maml:para>Path to restore the SQL Server backups to on the target instance. If only this parameter is specified, then all database files (data and log) will be restored to this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFilePrefix</maml:name><maml:description><maml:para>This value will be prefixed to ALL restored files (log and data). This is just a simple string prefix. If you want to perform more complex rename operations then please use the FileMapping parameter. This will apply to all file move options, except for FileMapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileStreamDirectory</maml:name><maml:description><maml:para>Path to restore FileStream data to. This parameter can only be specified alongside DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationFileSuffix</maml:name><maml:description><maml:para>This value will be suffixed to ALL restored files (log and data). This is just a simple string suffix. If you want to perform more complex rename operations then please use the FileMapping parameter. This will apply to all file move options, except for FileMapping.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationLogDirectory</maml:name><maml:description><maml:para>Path to restore the database log files to. This parameter can only be specified alongside DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DirectoryRecurse</maml:name><maml:description><maml:para>If specified the specified directory will be recursed into (overriding the default behaviour).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExecuteAs</maml:name><maml:description><maml:para>If value provided the restore will be executed under this login's context. The login must exist, and have the relevant permissions to perform the restore.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileMapping</maml:name><maml:description><maml:para>A hashtable that can be used to move specific files to a location. `$FileMapping = @{'DataFile1'='c:\restoredfiles\Datafile1.mdf';'DataFile3'='d:\DataFile3.mdf'}` And files not specified in the mapping will be restored to their original location. This Parameter is exclusive with DestinationDataDirectory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FormatBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Format-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GetBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Get-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>This switch tells the function to ignore differential backups. The process will restore to the latest full and onwards with transaction log backups only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>This switch tells the function to ignore transaction log backups. The process will restore to the latest full or differential backup point only.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be restored as part of the database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be restored as part of the database restore operation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaintenanceSolutionBackup</maml:name><maml:description><maml:para>Switch to indicate the backup files are in a folder structure as created by Ola Hallengreen's maintenance scripts. This switch enables a faster check for suitable backups. Other options require all files to be read first to ensure we have an anchoring full backup. Because we can rely on specific locations for backups performed with OlaHallengren's backup solution, we can rely on file locations.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple by 64kb.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>Indicates if the databases should be recovered after last restore. Default is to recover.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoXpDirRecurse</maml:name><maml:description><maml:para>If specified, prevents the XpDirTree process from recursing (its default behaviour).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place. Due to the limitations of SMO, this switch cannot be combined with VeriyOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestore</maml:name><maml:description><maml:para>Passes in an object from Get-DbaSuspectPages containing suspect pages from a single database. Setting this Parameter will cause an Online Page restore if the target Instance is Enterprise Edition, or offline if not. This will involve taking a tail log backup, so you must check your restore chain once it has completed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageRestoreTailFolder</maml:name><maml:description><maml:para>This parameter passes in a location for the tail log backup required for page level restore.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to SQL Server backup files. Paths passed in as strings will be scanned using the desired method, default is a recursive folder scan. Accepts multiple paths separated by ','. Or it can consist of FileInfo objects, such as the output of Get-ChildItem or Get-Item. This allows you to work with your own file structures as needed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Recover</maml:name><maml:description><maml:para>If set will perform recovery on the indicated database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceDbNameInFile</maml:name><maml:description><maml:para>If specified any occurrence of the original database's name in a data or log file will be replaced with the name specified in the DatabaseName parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoredDatabaseNamePrefix</maml:name><maml:description><maml:para>A string which will be prefixed to the start of the restore Database's Name. Useful if restoring a copy to the same sql server for testing.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>Specify a DateTime object to which you want the database restored to. Default is to the latest point available in the specified backups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>By default, databases will be migrated to the destination Sql Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. The same structure on the SOURCE will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc). *Note, to reuse destination folder structure, specify -WithReplace</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SelectBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Select-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StandbyDirectory</maml:name><maml:description><maml:para>If a directory is specified the database(s) will be restored into a standby state, with the standby file placed into this directory (which must exist, and be writable by the target Sql Server instance).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StatementTimeout</maml:name><maml:description><maml:para>Timeout in minutes. Defaults to infinity (restores can take a while).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterDate</maml:name><maml:description><maml:para>By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterFormatBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning FormatBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterGetBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning GetBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterSelectBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning SelectBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAfterTestBackupInformation</maml:name><maml:description><maml:para>Switch which will cause the function to exit after returning TestBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopBefore</maml:name><maml:description><maml:para>Switch to indicate the restore should stop before StopMark occurs, default is to stop when mark is created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopMark</maml:name><maml:description><maml:para>Marked point in the transaction log to stop the restore at (Mark is created via BEGIN TRANSACTION (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver15)).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TestBackupInformation</maml:name><maml:description><maml:para>Passing a string value into this parameter will cause a global variable to be created holding the output of Test-DbaBackupInformation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TrustDbBackupHistory</maml:name><maml:description><maml:para>This switch can be used when piping the output of Get-DbaDbBackupHistory or Backup-DbaDatabase into this command. It allows the user to say that they trust that the output from those commands is correct, and skips the file header read portion of the process. This means a faster process, but at the risk of not knowing till halfway through the restore that something is wrong with a file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseDestinationDefaultDirectories</maml:name><maml:description><maml:para>Switch that tells the restore to use the default Data and Log locations on the target server. If they don't exist, the function will try to create them.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>Switch indicate that restore should be verified. Due to the limitations of SMO, this switch cannot be combined with OutputScriptOnly, and a warning will be raised if it is.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>Switch indicated is the restore is allowed to replace an existing database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>XpDirTree</maml:name><maml:description><maml:para>Switch that indicated file scanning should be performed by the SQL Server instance using xp_dirtree. This will scan recursively from the passed in path. You must have sysadmin role membership on the instance for this to work.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path \\server2\backups </dev:code><dev:remarks><maml:para> Scans all the backup files in \\server2\backups, filters them and restores the database to server1\instance1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path \\server2\backups -MaintenanceSolutionBackup -DestinationDataDirectory c:\restores </dev:code><dev:remarks><maml:para> Scans all the backup files in \\server2\backups$ stored in an Ola Hallengren style folder structure, filters them and restores the database to the c:\restores folder on server1\instance1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem c:\SQLbackups1\, \\server\sqlbackups2 | Restore-DbaDatabase -SqlInstance server1\instance1 </dev:code><dev:remarks><maml:para> Takes the provided files from multiple directories and restores them on server1\instance1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $RestoreTime = Get-Date('11:19 23/12/2016') </dev:code><dev:remarks><maml:para> PS C:\> Restore-DbaDatabase -SqlInstance server1\instance1 -Path \\server2\backups -MaintenanceSolutionBackup -DestinationDataDirectory c:\restores -RestoreTime $RestoreTime Scans all the backup files in \\server2\backups stored in an Ola Hallengren style folder structure, filters them and restores the database to the c:\restores folder on server1\instance1 up to 11:19 23/12/2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $result = Restore-DbaDatabase -SqlInstance server1\instance1 -Path \\server2\backups -DestinationDataDirectory c:\restores -OutputScriptOnly </dev:code><dev:remarks><maml:para> PS C:\> $result | Out-File -Filepath c:\scripts\restore.sql Scans all the backup files in \\server2\backups, filters them and generate the T-SQL Scripts to restore the database to the latest point in time, and then stores the output in a file for later retrieval </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path c:\backups -DestinationDataDirectory c:\DataFiles -DestinationLogDirectory c:\LogFile </dev:code><dev:remarks><maml:para> Scans all the files in c:\backups and then restores them onto the SQL Server Instance server1\instance1, placing data files c:\DataFiles and all the log files into c:\LogFiles </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path http://demo.blob.core.windows.net/backups/dbbackup.bak -AzureCredential MyAzureCredential </dev:code><dev:remarks><maml:para> Will 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 credential MyAzureCredential held on instance Server1\instance1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path http://demo.blob.core.windows.net/backups/dbbackup.bak </dev:code><dev:remarks><maml:para> Will attempt to restore the backups from http://demo.blob.core.windows.net/backups/dbbackup.bak if a SAS credential with the name http://demo.blob.core.windows.net/backups exists on server1\instance1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $File = Get-ChildItem c:\backups, \\server1\backups </dev:code><dev:remarks><maml:para> PS C:\> $File | Restore-DbaDatabase -SqlInstance Server1\Instance -UseDestinationDefaultDirectories This will take all of the files found under the folders c:\backups and \\server1\backups, and pipeline them into Restore-DbaDatabase. Restore-DbaDatabase will then scan all of the files, and restore all of the databases included to the latest point in time covered by their backups. All data and log files will be moved to the default SQL Server folder for those file types as defined on the target instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $files = Get-ChildItem C:\dbatools\db1 </dev:code><dev:remarks><maml:para> PS C:\> $params = @{ >> SqlInstance = 'server\instance1' >> DestinationFilePrefix = 'prefix' >> DatabaseName ='Restored' >> RestoreTime = (get-date "14:58:30 22/05/2017") >> NoRecovery = $true >> WithReplace = $true >> StandbyDirectory = 'C:\dbatools\standby' >> } >> PS C:\> $files | Restore-DbaDatabase @params PS C:\> Invoke-DbaQuery -SQLInstance server\instance1 -Query "select top 1 * from Restored.dbo.steps order by dt desc" PS C:\> $params.RestoreTime = (get-date "15:09:30 22/05/2017") PS C:\> $params.NoRecovery = $false PS C:\> $params.Add("Continue",$true) PS C:\> $files | Restore-DbaDatabase @params PS C:\> Invoke-DbaQuery -SQLInstance server\instance1 -Query "select top 1 * from Restored.dbo.steps order by dt desc" PS C:\> Restore-DbaDatabase -SqlInstance server\instance1 -DestinationFilePrefix prefix -DatabaseName Restored -Continue -WithReplace In this example we step through the backup files held in c:\dbatools\db1 folder. First we restore the database to a point in time in standby mode. This means we can check some details in the databases We then roll it on a further 9 minutes to perform some more checks And finally we continue by rolling it all the way forward to the latest point in the backup. At each step, only the log files needed to roll the database forward are restored. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server\instance1 -Path c:\backups -DatabaseName example1 -NoRecovery </dev:code><dev:remarks><maml:para> PS C:\> Restore-DbaDatabase -SqlInstance server\instance1 -Recover -DatabaseName example1 In this example we restore example1 database with no recovery, and then the second call is to set the database to recovery. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbBackupHistory - SqlInstance server\instance1 -Database ProdFinance -Last | Restore-DbaDatabase -PageRestore </dev:code><dev:remarks><maml:para> PS C:\> $SuspectPage -PageRestoreTailFolder c:\temp -TrustDbBackupHistory Gets a list of Suspect Pages using Get-DbaSuspectPage. The uses Get-DbaDbBackupHistory and Restore-DbaDatabase to perform a restore of the suspect pages and bring them up to date If server\instance1 is Enterprise edition this will be done online, if not it will be performed offline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 13 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $BackupHistory = Get-DbaBackupInformation -SqlInstance sql2005 -Path \\backups\sql2000\ProdDb </dev:code><dev:remarks><maml:para> PS C:\> $BackupHistory | Restore-DbaDatabase -SqlInstance sql2000 -TrustDbBackupHistory Due 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 This will use a SQL Server instance > 2000 to read the headers, and then pass them in to Restore-DbaDatabase as a BackupHistory object. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1\instance1 -Path "C:\Temp\devops_prod_full.bak" -DatabaseName "DevOps_DEV" -ReplaceDbNameInFile </dev:code><dev:remarks><maml:para> PS C:\> Rename-DbaDatabase -SqlInstance server1\instance1 -Database "DevOps_DEV" -LogicalName "<DBN>_<FT>" This 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 configured data and log locations. After 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 15 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $FileStructure = @{ </dev:code><dev:remarks><maml:para> >> 'database_data' = 'C:\Data\database_data.mdf' >> 'database_log' = 'C:\Log\database_log.ldf' >> } >> PS C:\> Restore-DbaDatabase -SqlInstance server1 -Path \\ServerName\ShareName\File -DatabaseName database -FileMapping $FileStructure Restores 'database' to 'server1' 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 16 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $filemap = Get-DbaDbFileMapping -SqlInstance sql2016 -Database test </dev:code><dev:remarks><maml:para> PS C:\> Get-ChildItem \\nas\db\backups\test | Restore-DbaDatabase -SqlInstance sql2019 -Database test -FileMapping $filemap.FileMapping Restores test to sql2019 using the file structure built from the existing database on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 17 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDatabase -SqlInstance server1 -Path \\ServerName\ShareName\File -DatabaseName database -StopMark OvernightStart -StopBefore -StopAfterDate Get-Date('21:00 10/05/2020') </dev:code><dev:remarks><maml:para> Restores the backups from \\ServerName\ShareName\File as database, stops before the first 'OvernightStart' mark that occurs after '21:00 10/05/2020'. Note that Date time needs to be specified in your local SQL Server culture </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Restore-DbaDatabase</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Restore-DbaDbCertificate</command:name><command:noun>DbaDbCertificate</command:noun><command:verb>Restore</command:verb><maml:description><maml:para>Imports certificates from .cer files using SMO.</maml:para></maml:description></command:details><maml:description><maml:para>Imports certificates from.cer files using SMO.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-DbaDbCertificate</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path the contains the certificate and private key files. The path can be a directory or a specific certificate.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>KeyFilePath</maml:name><maml:description><maml:para>The Path the contains the private key file. If one is not specified, we will try to find it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>If specified this will be used to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate imports into. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The optional name for the certificate, otherwise, it will be guessed from the certificate file name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the certificate imports into. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DecryptionPassword</maml:name><maml:description><maml:para>Secure string used to decrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptionPassword</maml:name><maml:description><maml:para>If specified this will be used to encrypt the private key.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeyFilePath</maml:name><maml:description><maml:para>The Path the contains the private key file. If one is not specified, we will try to find it for you.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The optional name for the certificate, otherwise, it will be guessed from the certificate file name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path the contains the certificate and private key files. The path can be a directory or a specific certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: CertBackup, Certificate, Backup Author: Jess Pomfret (@jpomfret), jesspomfret.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $securepass = Get-Credential usernamedoesntmatter | Select-Object -ExpandProperty Password </dev:code><dev:remarks><maml:para> PS C:\> Restore-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates -DecryptionPassword $securepass Restores all the certificates in the specified path, password is used to both decrypt and encrypt the private key. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates\DatabaseTDE.cer -DecryptionPassword (Get-Credential usernamedoesntmatter).Password </dev:code><dev:remarks><maml:para> Restores the DatabaseTDE certificate to Server1 and uses the MasterKey to encrypt the private key. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Restore-DbaDbCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Restore-DbaDbSnapshot</command:name><command:noun>DbaDbSnapshot</command:noun><command:verb>Restore</command:verb><maml:description><maml:para>Restores databases from snapshots</maml:para></maml:description></command:details><maml:description><maml:para>Restores the database from the snapshot, discarding every modification made to the database</maml:para><maml:para>NB: Restoring to a snapshot will result in every other snapshot of the same database to be dropped</maml:para><maml:para>It also fixes some long-standing bugs in SQL Server when restoring from snapshots</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-DbaDbSnapshot</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Restores from the last snapshot databases with this names only. You can pass either Databases or Snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Restores databases from snapshots with this names only. You can pass either Databases or Snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from other Snapshot commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If restoring from a snapshot involves dropping any other snapshot, you need to explicitly use -Force to let this command delete the ones not involved in the restore process. Also, -Force will forcibly kill all running queries that prevent the restore process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Restores from the last snapshot databases with this names only. You can pass either Databases or Snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If restoring from a snapshot involves dropping any other snapshot, you need to explicitly use -Force to let this command delete the ones not involved in the restore process. Also, -Force will forcibly kill all running queries that prevent the restore process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from other Snapshot commands</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Snapshot</maml:name><maml:description><maml:para>Restores databases from snapshots with this names only. You can pass either Databases or Snapshots</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Snapshot, Backup, Restore, Database Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDbSnapshot -SqlInstance sql2014 -Database HR, Accounting </dev:code><dev:remarks><maml:para> Restores HR and Accounting databases using the latest snapshot available </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDbSnapshot -SqlInstance sql2014 -Database HR -Force </dev:code><dev:remarks><maml:para> Restores HR database from latest snapshot and kills any active connections in the database on sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sql2016 -Database HR | Restore-DbaDbSnapshot -Force </dev:code><dev:remarks><maml:para> Restores HR database from latest snapshot and kills any active connections in the database on sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbSnapshot -SqlInstance sql2016 | Out-GridView -PassThru | Restore-DbaDbSnapshot </dev:code><dev:remarks><maml:para> Allows the selection of snapshots on sql2016 to restore </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Restore-DbaDbSnapshot -SqlInstance sql2014 -Snapshot HR_snap_20161201, Accounting_snap_20161101 </dev:code><dev:remarks><maml:para> Restores databases from snapshots named HR_snap_20161201 and Accounting_snap_20161101 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Restore-DbaDbSnapshot</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Resume-DbaAgDbDataMovement</command:name><command:noun>DbaAgDbDataMovement</command:noun><command:verb>Resume</command:verb><maml:description><maml:para>Resumes data movement for an availability group database on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Resumes data movement for an availability group database on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resume-DbaAgDbDataMovement</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group where the database movement will be resumed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to resume movement upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group where the database movement will be resumed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to resume movement upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Resume-DbaAgDbDataMovement -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1, db2 </dev:code><dev:remarks><maml:para> Resumes data movement on db1 and db2 to ag1 on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgDatabase -SqlInstance sql2017a, sql2019 | Out-GridView -Passthru | Resume-DbaAgDbDataMovement -Confirm:$false </dev:code><dev:remarks><maml:para> Resumes data movement on the selected availability group databases. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Resume-DbaAgDbDataMovement</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Revoke-DbaAgPermission</command:name><command:noun>DbaAgPermission</command:noun><command:verb>Revoke</command:verb><maml:description><maml:para>Revokes endpoint and availability group permissions to a login.</maml:para></maml:description></command:details><maml:description><maml:para>Revokes endpoint and availability group permissions to a login.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Revoke-DbaAgPermission</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login or logins to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only modify specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specify type: Endpoint or AvailabilityGroup. Endpoint will modify the DatabaseMirror endpoint type.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Permission</maml:name><maml:description><maml:para>Revokes one or more permissions: Alter Connect Control CreateAnyDatabase CreateSequence Delete Execute Impersonate Insert Receive References Select Send TakeOwnership Update ViewChangeTracking ViewDefinition Connect is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only modify specific availability groups.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login or logins to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Permission</maml:name><maml:description><maml:para>Revokes one or more permissions: Alter Connect Control CreateAnyDatabase CreateSequence Delete Execute Impersonate Insert Receive References Select Send TakeOwnership Update ViewChangeTracking ViewDefinition Connect is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Specify type: Endpoint or AvailabilityGroup. Endpoint will modify the DatabaseMirror endpoint type.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Revoke-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup SharePoint -Login ad\spservice -Permission CreateAnyDatabase </dev:code><dev:remarks><maml:para> Removes CreateAnyDatabase permissions from ad\spservice on the SharePoint availability group on sql2017a. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Revoke-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup ag1, ag2 -Login ad\spservice -Permission CreateAnyDatabase -Confirm </dev:code><dev:remarks><maml:para> Removes CreateAnyDatabase permissions from ad\spservice on the ag1 and ag2 availability groups on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance sql2017a | Out-GridView -Passthru | Revoke-DbaAgPermission -Type EndPoint </dev:code><dev:remarks><maml:para> Revokes the selected logins Connect permissions on the DatabaseMirroring endpoint for sql2017a. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Revoke-DbaAgPermission</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Save-DbaCommunitySoftware</command:name><command:noun>DbaCommunitySoftware</command:noun><command:verb>Save</command:verb><maml:description><maml:para>Download and extract software from Github to update the local cached version of that software.</maml:para></maml:description></command:details><maml:description><maml:para>Download and extract software from Github to update the local cached version of that software.</maml:para><maml:para>This command is run from inside of Install-Dba* and Update-Dba* commands to update the local cache if needed.</maml:para><maml:para>In case you don't have internet access on the target computer, you can download the zip files from the following URLs</maml:para><maml:para>at another computer, transfer them to the target computer or place them on a network share and then use -LocalFile</maml:para><maml:para>to update the local cache:</maml:para><maml:para>* MaintenanceSolution: https://github.com/olahallengren/sql-server-maintenance-solution</maml:para><maml:para>* FirstResponderKit: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/releases</maml:para><maml:para>* DarlingData: https://github.com/erikdarlingdata/DarlingData</maml:para><maml:para>* SQLWATCH: https://github.com/marcingminski/sqlwatch/releases</maml:para><maml:para>* WhoIsActive: https://github.com/amachanic/sp_whoisactive/releases</maml:para><maml:para>* DbaMultiTool: https://github.com/LowlyDBA/dba-multitool/releases</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Save-DbaCommunitySoftware</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Software</maml:name><maml:description><maml:para>Name of the software to download. Options include: * MaintenanceSolution: SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com) * FirstResponderKit: First Responder Kit created by Brent Ozar (http://FirstResponderKit.org) * DarlingData: Erik Darling's stored procedures (https://www.erikdarlingdata.com) * SQLWATCH: SQL Server Monitoring Solution created by Marcin Gminski (https://sqlwatch.io/) * WhoIsActive: Adam Machanic's comprehensive activity monitoring stored procedure sp_WhoIsActive (https://github.com/amachanic/sp_whoisactive) * DbaMultiTool: John McCall's T-SQL scripts for the long haul: optimizing storage, on-the-fly documentation, and general administrative needs (https://dba-multitool.org)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies the branch. Defaults to master or main. Can only be used if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from instead of downloading from Github.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Url</maml:name><maml:description><maml:para>Specifies the URL to download from. Is not needed if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalDirectory</maml:name><maml:description><maml:para>Specifies the local directory to extract the downloaded file to. Is not needed if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Branch</maml:name><maml:description><maml:para>Specifies the branch. Defaults to master or main. Can only be used if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalDirectory</maml:name><maml:description><maml:para>Specifies the local directory to extract the downloaded file to. Is not needed if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from instead of downloading from Github.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Software</maml:name><maml:description><maml:para>Name of the software to download. Options include: * MaintenanceSolution: SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com) * FirstResponderKit: First Responder Kit created by Brent Ozar (http://FirstResponderKit.org) * DarlingData: Erik Darling's stored procedures (https://www.erikdarlingdata.com) * SQLWATCH: SQL Server Monitoring Solution created by Marcin Gminski (https://sqlwatch.io/) * WhoIsActive: Adam Machanic's comprehensive activity monitoring stored procedure sp_WhoIsActive (https://github.com/amachanic/sp_whoisactive) * DbaMultiTool: John McCall's T-SQL scripts for the long haul: optimizing storage, on-the-fly documentation, and general administrative needs (https://dba-multitool.org)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Url</maml:name><maml:description><maml:para>Specifies the URL to download from. Is not needed if Software is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community Author: Andreas Jordan, @JordanOrdix Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaCommunitySoftware -Software MaintenanceSolution </dev:code><dev:remarks><maml:para> Updates the local cache of Ola Hallengren's Solution objects. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaCommunitySoftware -Software FirstResponderKit -LocalFile \\fileserver\Software\SQL-Server-First-Responder-Kit-20211106.zip </dev:code><dev:remarks><maml:para> Updates the local cache of the First Responder Kit based on the given file. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Save-DbaCommunitySoftware</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Save-DbaDiagnosticQueryScript</command:name><command:noun>DbaDiagnosticQueryScript</command:noun><command:verb>Save</command:verb><maml:description><maml:para>Save-DbaDiagnosticQueryScript downloads the most recent version of all Glenn Berry DMV scripts</maml:para></maml:description></command:details><maml:description><maml:para>The dbatools module will have the diagnostic queries pre-installed. Use this only to update to a more recent version or specific versions.</maml:para><maml:para>This function is mainly used by Invoke-DbaDiagnosticQuery, but can also be used independently to download the Glenn Berry DMV scripts.</maml:para><maml:para>Use this function to pre-download the scripts from a device with an Internet connection.</maml:para><maml:para>The function Invoke-DbaDiagnosticQuery will try to download these scripts automatically, but it obviously needs an internet connection to do that.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Save-DbaDiagnosticQueryScript</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the output</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Specifies the path to the output</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.IO.FileInfo</command:parameterValue><dev:type><maml:name>System.IO.FileInfo</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, GlennBerry Author: Andre Kamman (@AndreKamman), andrekamman.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaDiagnosticQueryScript -Path c:\temp </dev:code><dev:remarks><maml:para> Downloads the most recent version of all Glenn Berry DMV scripts to the specified location. If Path is not specified, the "My Documents" location will be used. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Save-DbaDiagnosticQueryScript</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Save-DbaKbUpdate</command:name><command:noun>DbaKbUpdate</command:noun><command:verb>Save</command:verb><maml:description><maml:para>Downloads patches from Microsoft</maml:para></maml:description></command:details><maml:description><maml:para>Downloads patches from Microsoft</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Save-DbaKbUpdate</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The KB name or number. For example, KB4057119 or 4057119.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to save the file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The exact file name to save to, otherwise, it uses the name given by the webserver</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Architecture</maml:name><maml:description><maml:para>Defaults to x64. Can be x64, x86, ia64 or "All"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Cumulative Updates come in one file for all languages, but Service Packs have a file for every language. If you want to download only a specific language, use this parameter. You have to use the three letter code that is part of the filename, e. g. "enu" for english or "deu" for german.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaKbUpdate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Architecture</maml:name><maml:description><maml:para>Defaults to x64. Can be x64, x86, ia64 or "All"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The exact file name to save to, otherwise, it uses the name given by the webserver</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaKbUpdate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Language</maml:name><maml:description><maml:para>Cumulative Updates come in one file for all languages, but Service Packs have a file for every language. If you want to download only a specific language, use this parameter. You have to use the three letter code that is part of the filename, e. g. "enu" for english or "deu" for german.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The KB name or number. For example, KB4057119 or 4057119.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The directory to save the file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install, Patching Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaKbUpdate -Name KB4057119 </dev:code><dev:remarks><maml:para> Downloads KB4057119 to the current directory. This works for SQL Server or any other KB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaKbUpdate -Name KB4057119 -Simple | Out-GridView -Passthru | Save-DbaKbUpdate </dev:code><dev:remarks><maml:para> Downloads the selected files from KB4057119 to the current directory. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaKbUpdate -Name KB4057119, 4057114 -Path C:\temp </dev:code><dev:remarks><maml:para> Downloads KB4057119 and the x64 version of KB4057114 to C:\temp. This works for SQL Server or any other KB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaKbUpdate -Name KB4057114 -Architecture All -Path C:\temp </dev:code><dev:remarks><maml:para> Downloads the x64 version of KB4057114 and the x86 version of KB4057114 to C:\temp. This works for SQL Server or any other KB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Save-DbaKbUpdate -Name KB5003279 -Language enu -Path C:\temp </dev:code><dev:remarks><maml:para> Downloads only the english version of KB5003279, which is the Service Pack 3 for SQL Server 2016, to C:\temp. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Save-DbaKbUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Select-DbaBackupInformation</command:name><command:noun>DbaBackupInformation</command:noun><command:verb>Select</command:verb><maml:description><maml:para>Select a subset of backups from a dbatools backup history object</maml:para></maml:description></command:details><maml:description><maml:para>Select-DbaBackupInformation filters out a subset of backups from the dbatools backup history object with parameters supplied.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Select-DbaBackupInformation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>A dbatools.BackupHistory object containing backup history records</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>The point in time you want to restore to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogs</maml:name><maml:description><maml:para>This switch will cause Log Backups to be ignored. So will restore to the last Full or Diff backup only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffs</maml:name><maml:description><maml:para>This switch will cause Differential backups to be ignored. Unless IgnoreLogs is specified, restore to point in time will still occur, just using all available log backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>A string array of Database Names that you want to filter to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>A string array of Server Names that you want to filter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ContinuePoints</maml:name><maml:description><maml:para>The Output of Get-RestoreContinuableDatabase while provides 'Database',redo_start_lsn,'FirstRecoveryForkID' values. Used to filter backups to continue a restore on a database Sets IgnoreDiffs, and also filters databases to only those within the ContinuePoints object, or the ContinuePoints object AND DatabaseName if both specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastRestoreType</maml:name><maml:description><maml:para>The Output of Get-DbaDbRestoreHistory -last This is used to check the last type of backup to a database to see if a differential backup can be restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>A dbatools.BackupHistory object containing backup history records</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ContinuePoints</maml:name><maml:description><maml:para>The Output of Get-RestoreContinuableDatabase while provides 'Database',redo_start_lsn,'FirstRecoveryForkID' values. Used to filter backups to continue a restore on a database Sets IgnoreDiffs, and also filters databases to only those within the ContinuePoints object, or the ContinuePoints object AND DatabaseName if both specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseName</maml:name><maml:description><maml:para>A string array of Database Names that you want to filter to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffs</maml:name><maml:description><maml:para>This switch will cause Differential backups to be ignored. Unless IgnoreLogs is specified, restore to point in time will still occur, just using all available log backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogs</maml:name><maml:description><maml:para>This switch will cause Log Backups to be ignored. So will restore to the last Full or Diff backup only</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LastRestoreType</maml:name><maml:description><maml:para>The Output of Get-DbaDbRestoreHistory -last This is used to check the last type of backup to a database to see if a differential backup can be restored</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestoreTime</maml:name><maml:description><maml:para>The point in time you want to restore to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServerName</maml:name><maml:description><maml:para>A string array of Server Names that you want to filter</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, Restore Author:Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\> $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) Returns all backups needed to restore all the backups in \\server1\backups$ to 1 hour ago </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\> $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -DatabaseName ProdFinance Returns all the backups needed to restore Database ProdFinance to an hour ago </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\> $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -IgnoreLogs Returns 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\> $FilteredBackups = $Backups | Select-DbaBackupInformation -RestoreTime (Get-Date).AddHours(-1) -IgnoreDiffs Returns all the backups in \\server1\backups$ to restore to 1 hour ago using only Full and Diff backups. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Select-DbaBackupInformation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Select-DbaDbSequenceNextValue</command:name><command:noun>DbaDbSequenceNextValue</command:noun><command:verb>Select</command:verb><maml:description><maml:para>Selects the next value from a sequence.</maml:para></maml:description></command:details><maml:description><maml:para>Selects the next value from a sequence.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Select-DbaDbSequenceNextValue</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the sequence.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Data, Sequence, Table Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Select-DbaDbSequenceNextValue -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence </dev:code><dev:remarks><maml:para> Selects the next value from the sequence TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01 -Database TestDB | Select-DbaDbSequenceNextValue -Sequence TestSequence -Schema TestSchema </dev:code><dev:remarks><maml:para> Using a pipeline this command selects the next value from the sequence TestSchema.TestSequence in the TestDB database on the sqldev01 instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Select-DbaDbSequenceNextValue</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentAlert</command:name><command:noun>DbaAgentAlert</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentAlert updates the status of a SQL Agent Alert.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentAlert updates an alert in the SQL Server Agent with parameters supplied.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentAlert</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The name of the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enabled the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disabled the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping alert objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Alert[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Alert[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Alert</maml:name><maml:description><maml:para>The name of the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disabled the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enabled the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping alert objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Alert[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Alert[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the alert.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Alert Author: Garry Bargsley (@gbargsley), garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentAlert -SqlInstance sql1 -Alert 'Severity 025: Fatal Error' -Disabled </dev:code><dev:remarks><maml:para> Changes the alert to disabled. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentAlert -SqlInstance sql1 -Alert 'Severity 025: Fatal Error', 'Error Number 825', 'Error Number 824' -Enabled </dev:code><dev:remarks><maml:para> Changes multiple alerts to enabled. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentAlert -SqlInstance sql1, sql2, sql3 -Alert 'Severity 025: Fatal Error', 'Error Number 825', 'Error Number 824' -Enabled </dev:code><dev:remarks><maml:para> Changes multiple alerts to enabled on multiple servers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentAlert -SqlInstance sql1 -Alert 'Severity 025: Fatal Error' -Disabled -WhatIf </dev:code><dev:remarks><maml:para> Doesn't Change the alert but shows what would happen. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentAlert</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentJob updates a job.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentJob updates a job in the SQL Server Agent with parameters supplied.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJob</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Schedule to attach to job. This can be more than one schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleId</maml:name><maml:description><maml:para>Schedule ID to attach to job. This can be more than one schedule ID.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enabled the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disabled the job</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartStepId</maml:name><maml:description><maml:para>The identification number of the first step to execute for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The category of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OwnerLogin</maml:name><maml:description><maml:para>The name of the login that owns the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventLogLevel</maml:name><maml:description><maml:para>Specifies when to place an entry in the Microsoft Windows application log for this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailLevel</maml:name><maml:description><maml:para>Specifies when to send an e-mail upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendLevel</maml:name><maml:description><maml:para>Specifies when to send a network message upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageLevel</maml:name><maml:description><maml:para>Specifies when to send a page upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailOperator</maml:name><maml:description><maml:para>The e-mail name of the operator to whom the e-mail is sent when EmailLevel is reached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendOperator</maml:name><maml:description><maml:para>The name of the operator to whom the network message is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageOperator</maml:name><maml:description><maml:para>The name of the operator to whom a page is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteLevel</maml:name><maml:description><maml:para>Specifies when to delete the job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping job objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The category of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeleteLevel</maml:name><maml:description><maml:para>Specifies when to delete the job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Description</maml:name><maml:description><maml:para>The description of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disabled the job</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailLevel</maml:name><maml:description><maml:para>Specifies when to send an e-mail upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailOperator</maml:name><maml:description><maml:para>The e-mail name of the operator to whom the e-mail is sent when EmailLevel is reached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enabled the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EventLogLevel</maml:name><maml:description><maml:para>Specifies when to place an entry in the Microsoft Windows application log for this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping job objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendLevel</maml:name><maml:description><maml:para>Specifies when to send a network message upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetsendOperator</maml:name><maml:description><maml:para>The name of the operator to whom the network message is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OwnerLogin</maml:name><maml:description><maml:para>The name of the login that owns the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageLevel</maml:name><maml:description><maml:para>Specifies when to send a page upon the completion of this job. Allowed values 0, "Never", 1, "OnSuccess", 2, "OnFailure", 3, "Always" The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PageOperator</maml:name><maml:description><maml:para>The name of the operator to whom a page is sent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>Schedule to attach to job. This can be more than one schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleId</maml:name><maml:description><maml:para>Schedule ID to attach to job. This can be more than one schedule ID.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartStepId</maml:name><maml:description><maml:para>The identification number of the first step to execute for the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob sql1 -Job Job1 -Disabled </dev:code><dev:remarks><maml:para> Changes the job to disabled </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob sql1 -Job Job1 -OwnerLogin user1 </dev:code><dev:remarks><maml:para> Changes the owner of the job </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1 -Job Job1 -EventLogLevel OnSuccess </dev:code><dev:remarks><maml:para> Changes the job and sets the notification to write to the Windows Application event log on success </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1 -Job Job1 -EmailLevel OnFailure -EmailOperator dba </dev:code><dev:remarks><maml:para> Changes the job and sets the notification to send an e-mail to the e-mail operator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1 -Job Job1, Job2, Job3 -Enabled </dev:code><dev:remarks><maml:para> Changes multiple jobs to enabled </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job Job1, Job2, Job3 -Enabled </dev:code><dev:remarks><maml:para> Changes multiple jobs to enabled on multiple servers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1 -Job Job1 -Description 'Just another job' -Whatif </dev:code><dev:remarks><maml:para> Doesn't Change the job but shows what would happen. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJob -SqlInstance sql1, sql2, sql3 -Job 'Job One' -Description 'Job One' </dev:code><dev:remarks><maml:para> Changes a job with the name "Job1" on multiple servers to have another description </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | Set-DbaAgentJob -Job Job1 -Description 'Job One' </dev:code><dev:remarks><maml:para> Changes a job with the name "Job1" on multiple servers to have another description using pipe line </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentJobCategory</command:name><command:noun>DbaAgentJobCategory</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentJobCategory changes a job category.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentJobCategory makes it possible to change a job category.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJobCategory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>New name of the job category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Category</maml:name><maml:description><maml:para>The name of the category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>New name of the job category</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobCategory Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaAgentJobCategory -SqlInstance sql1 -Category 'Category 1' -NewName 'Category 2' </dev:code><dev:remarks><maml:para> Change the name of the category from 'Category 1' to 'Category 2'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobCategory -SqlInstance sql1, sql2 -Category Category1, Category2 -NewName cat1, cat2 </dev:code><dev:remarks><maml:para> Rename multiple jobs in one go on multiple servers. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentJobCategory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentJobOutputFile</command:name><command:noun>DbaAgentJobOutputFile</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set the output file for a step within an Agent job.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the Output File for a step of an agent job with the Job Names and steps provided dynamically if required</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJobOutputFile</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job to process - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Step</maml:name><maml:description><maml:para>The Agent Job Step to provide Output File Path for. Also available dynamically</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>OutputFile</maml:name><maml:description><maml:para>The Full Path to the New Output file</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job to process - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFile</maml:name><maml:description><maml:para>The Full Path to the New Output file</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance. be it Windows or SQL Server. Windows users are determined by the existence of a backslash, so if you are intending to use an alternative Windows connection instead of a SQL login, ensure it contains a backslash.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Step</maml:name><maml:description><maml:para>The Agent Job Step to provide Output File Path for. Also available dynamically</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, SqlAgent Author: Rob Sewell, sqldbawithabeard.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobOutputFile -SqlInstance SERVERNAME -Job 'The Agent Job' -OutPutFile E:\Logs\AgentJobStepOutput.txt </dev:code><dev:remarks><maml:para> Sets the Job step for The Agent job on SERVERNAME to E:\Logs\AgentJobStepOutput.txt </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentJobOutputFile</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentJobOwner</command:name><command:noun>DbaAgentJobOwner</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets SQL Agent job owners with a desired login if jobs do not match that owner.</maml:para></maml:description></command:details><maml:description><maml:para>This function alters SQL Agent Job ownership to match a specified login if their current owner does not match the target login.</maml:para><maml:para>By default, the target login will be 'sa',</maml:para><maml:para>but the the user may specify a different login for ownership.</maml:para><maml:para>This be applied to all local (non MultiServer) jobs or only to a select collection of jobs.</maml:para><maml:para>Best practice reference: https://www.itprotoday.com/sql-server-tip-assign-ownership-jobs-sysadmin-account</maml:para><maml:para>If the 'sa' account was renamed, the new name will be used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJobOwner</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specifies the job(s) to process. Options for this list are auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specifies the job(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specifies the job(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaAgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specifies the job(s) to process. Options for this list are auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobOwner -SqlInstance localhost </dev:code><dev:remarks><maml:para> Sets SQL Agent Job owner to sa on all jobs where the owner does not match sa. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobOwner -SqlInstance localhost -Login DOMAIN\account </dev:code><dev:remarks><maml:para> Sets SQL Agent Job owner to 'DOMAIN\account' on all jobs where the owner does not match 'DOMAIN\account'. Note that Login must be a valid security principal that exists on the target server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobOwner -SqlInstance localhost -Job job1, job2 </dev:code><dev:remarks><maml:para> Sets SQL Agent Job owner to 'sa' on the job1 and job2 jobs if their current owner does not match 'sa'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sqlserver','sql2016' | Set-DbaAgentJobOwner </dev:code><dev:remarks><maml:para> Sets SQL Agent Job owner to sa on all jobs where the owner does not match sa on both sqlserver and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance vmsql | Where-Object OwnerLoginName -eq login1 | Set-DbaAgentJobOwner -TargetLogin login2 | Out-Gridview </dev:code><dev:remarks><maml:para> Sets SQL Agent Job owner to login2 where their current owner is login1 on instance vmsql. Send result to gridview. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentJobOwner</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentJobStep</command:name><command:noun>DbaAgentJobStep</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentJobStep updates a job step.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentJobStep updates a job step in the SQL Server Agent with parameters supplied.</maml:para><maml:para>Note: ActiveScripting (ActiveX scripting) was discontinued in SQL Server 2016: https://docs.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJobStep</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job or the job object itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the step in case it needs to be renamed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subsystem</maml:name><maml:description><maml:para>The subsystem used by the SQL Server Agent service to execute command. Allowed values 'ActiveScripting','AnalysisCommand','AnalysisQuery','CmdExec','Distribution','LogReader','Merge','PowerShell','QueueReader','Snapshot','Ssis','TransactSql'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubsystemServer</maml:name><maml:description><maml:para>The subsystems AnalysisScripting, AnalysisCommand, AnalysisQuery require a server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Command</maml:name><maml:description><maml:para>The commands to be executed by the SQLServerAgent service through the subsystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CmdExecSuccessCode</maml:name><maml:description><maml:para>The value returned by a CmdExec subsystem command to indicate that command executed successfully.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessAction</maml:name><maml:description><maml:para>The action to perform if the step succeeds. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step succeeds and OnSuccessAction is "GoToNextStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailAction</maml:name><maml:description><maml:para>The action to perform if the step fails. Allowed values "QuitWithFailure" (default), "QuitWithSuccess", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step fails and OnFailAction is "GoToNextStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the database in which to execute a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseUser</maml:name><maml:description><maml:para>The name of the user account to use when executing a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryAttempts</maml:name><maml:description><maml:para>The number of retry attempts to use if this step fails.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryInterval</maml:name><maml:description><maml:para>The amount of time in minutes between retry attempts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileName</maml:name><maml:description><maml:para>The name of the file in which the output of this step is saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Sets the flag(s) for the job step. Flag Description ---------------------------------------------------------------------------- AppendAllCmdExecOutputToJobHistory Job history, including command output, is appended to the job history file. AppendToJobHistory Job history is appended to the job history file. AppendToLogFile Job history is appended to the SQL Server log file. AppendToTableLog Job history is appended to a log table. LogToTableWithOverwrite Job history is written to a log table, overwriting previous contents. None Job history is not appended to a file. ProvideStopProcessEvent Job processing is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyName</maml:name><maml:description><maml:para>The name of the proxy that the job step runs as.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows pipeline input from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CmdExecSuccessCode</maml:name><maml:description><maml:para>The value returned by a CmdExec subsystem command to indicate that command executed successfully.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Command</maml:name><maml:description><maml:para>The commands to be executed by the SQLServerAgent service through the subsystem.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the database in which to execute a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseUser</maml:name><maml:description><maml:para>The name of the user account to use when executing a Transact-SQL step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Flag</maml:name><maml:description><maml:para>Sets the flag(s) for the job step. Flag Description ---------------------------------------------------------------------------- AppendAllCmdExecOutputToJobHistory Job history, including command output, is appended to the job history file. AppendToJobHistory Job history is appended to the job history file. AppendToLogFile Job history is appended to the SQL Server log file. AppendToTableLog Job history is appended to a log table. LogToTableWithOverwrite Job history is written to a log table, overwriting previous contents. None Job history is not appended to a file. ProvideStopProcessEvent Job processing is stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows pipeline input from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job or the job object itself.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the step in case it needs to be renamed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailAction</maml:name><maml:description><maml:para>The action to perform if the step fails. Allowed values "QuitWithFailure" (default), "QuitWithSuccess", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnFailStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step fails and OnFailAction is "GoToNextStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessAction</maml:name><maml:description><maml:para>The action to perform if the step succeeds. Allowed values "QuitWithSuccess" (default), "QuitWithFailure", "GoToNextStep", "GoToStep". The text value van either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OnSuccessStepId</maml:name><maml:description><maml:para>The ID of the step in this job to execute if the step succeeds and OnSuccessAction is "GoToNextStep".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputFileName</maml:name><maml:description><maml:para>The name of the file in which the output of this step is saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProxyName</maml:name><maml:description><maml:para>The name of the proxy that the job step runs as.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryAttempts</maml:name><maml:description><maml:para>The number of retry attempts to use if this step fails.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetryInterval</maml:name><maml:description><maml:para>The amount of time in minutes between retry attempts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The name of the step.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Subsystem</maml:name><maml:description><maml:para>The subsystem used by the SQL Server Agent service to execute command. Allowed values 'ActiveScripting','AnalysisCommand','AnalysisQuery','CmdExec','Distribution','LogReader','Merge','PowerShell','QueueReader','Snapshot','Ssis','TransactSql'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SubsystemServer</maml:name><maml:description><maml:para>The subsystems AnalysisScripting, AnalysisCommand, AnalysisQuery require a server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -NewName Step2 </dev:code><dev:remarks><maml:para> Changes the name of the step in "Job1" with the name Step1 to Step2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobStep -SqlInstance sql1 -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Changes the database of the step in "Job1" with the name Step1 to msdb </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobStep -SqlInstance sql1 -Job Job1, Job2 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Changes job steps in multiple jobs with the name Step1 to msdb </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1, Job2 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Changes job steps in multiple jobs on multiple servers with the name Step1 to msdb </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentJobStep -SqlInstance sql1, sql2, sql3 -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Changes the database of the step in "Job1" with the name Step1 to msdb for multiple servers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | Set-DbaAgentJobStep -Job Job1 -StepName Step1 -Database msdb </dev:code><dev:remarks><maml:para> Changes the database of the step in "Job1" with the name Step1 to msdb for multiple servers using pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $jobStep = @{ </dev:code><dev:remarks><maml:para> SqlInstance = sqldev01 Job = dbatools1 StepName = "Step 2" Subsystem = "CmdExec" Command = "enter command text here" CmdExecSuccessCode = 0 OnSuccessAction = "GoToStep" OnSuccessStepId = 1 OnFailAction = "GoToStep" OnFailStepId = 1 Database = TestDB RetryAttempts = 2 RetryInterval = 5 OutputFileName = "logCmdExec.txt" Flag = [Microsoft.SqlServer.Management.Smo.Agent.JobStepFlags]::AppendAllCmdExecOutputToJobHistory ProxyName = "dbatoolsci_proxy_1" Force = $true } PS C:\>$newJobStep = Set-DbaAgentJobStep @jobStep Updates or creates a new job step named Step 2 in the dbatools1 job on the sqldev01 instance. The subsystem is set to CmdExec and uses a proxy. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentJobStep</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentOperator</command:name><command:noun>DbaAgentOperator</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Updates/modifies agent operators on an instance.</maml:para></maml:description></command:details><maml:description><maml:para>Updates/modifies agent operators on an instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentOperator</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The new name of the agent operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>The email address the SQL Agent will use to email alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendAddress</maml:name><maml:description><maml:para>The net send address the SQL Agent will use for the operator to net send alerts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerAddress</maml:name><maml:description><maml:para>The pager email address the SQL Agent will use to send alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerDay</maml:name><maml:description><maml:para>Defines what days the pager portion of the operator will be used. The default is 'Everyday'. Valid parameters are 'EveryDay', 'Weekdays', 'Weekend', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', and 'Saturday'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayStartTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayEndTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailsafeOperator</maml:name><maml:description><maml:para>If this switch is enabled, this operator will be your failsafe operator and replace the one that existed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailsafeNotificationMethod</maml:name><maml:description><maml:para>Defines the notification method(s) for the failsafe operator. The default is 'NotifyEmail'. Valid parameter values are 'None', 'NotifyEmail', 'Pager', 'NetSend', 'NotifyAll'. Values 'NotifyEmail', 'Pager', 'NetSend' can be specified in any combination. Values 'None' and 'NotifyAll' cannot be specified in conjunction with any other value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>SMO Server Objects (pipeline input from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Operator[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Operator[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EmailAddress</maml:name><maml:description><maml:para>The email address the SQL Agent will use to email alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailsafeNotificationMethod</maml:name><maml:description><maml:para>Defines the notification method(s) for the failsafe operator. The default is 'NotifyEmail'. Valid parameter values are 'None', 'NotifyEmail', 'Pager', 'NetSend', 'NotifyAll'. Values 'NotifyEmail', 'Pager', 'NetSend' can be specified in any combination. Values 'None' and 'NotifyAll' cannot be specified in conjunction with any other value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>SMO Server Objects (pipeline input from Connect-DbaInstance)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Operator[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Operator[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsFailsafeOperator</maml:name><maml:description><maml:para>If this switch is enabled, this operator will be your failsafe operator and replace the one that existed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The new name of the agent operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendAddress</maml:name><maml:description><maml:para>The net send address the SQL Agent will use for the operator to net send alerts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Operator</maml:name><maml:description><maml:para>Name of the operator in SQL Agent.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerAddress</maml:name><maml:description><maml:para>The pager email address the SQL Agent will use to send alerts to the operator.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PagerDay</maml:name><maml:description><maml:para>Defines what days the pager portion of the operator will be used. The default is 'Everyday'. Valid parameters are 'EveryDay', 'Weekdays', 'Weekend', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', and 'Saturday'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaturdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Saturday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayEndTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SundayStartTime</maml:name><maml:description><maml:para>This a string that takes the Sunday Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayEndTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager End Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WeekdayStartTime</maml:name><maml:description><maml:para>This a string that takes the Weekdays Pager Start Time.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Operator Author: Tracy Boggiano (@TracyBoggiano), databasesuperhero.com Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress operator@operator.com -PagerDay Everyday </dev:code><dev:remarks><maml:para> This sets the operator named DBA with the above email address with default values to alerts everyday for all hours of the day. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress operator@operator.com -NetSendAddress dbauser1 -PagerAddress dbauser1@pager.dbatools.io -PagerDay Everyday -SaturdayStartTime 070000 -SaturdayEndTime 180000 -SundayStartTime 080000 -SundayEndTime 170000 -WeekdayStartTime 060000 -WeekdayEndTime 190000 </dev:code><dev:remarks><maml:para> Creates a new operator named DBA on the sql01 instance with email address operator@operator.com, net send address of dbauser1, pager address of dbauser1@pager.dbatools.io, page day as every day, Saturday start time of 7am, Saturday end time of 6pm, Sunday start time of 8am, Sunday end time of 5pm, Weekday start time of 6am, and Weekday end time of 7pm. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentOperator</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentSchedule updates a schedule in the msdb database.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentSchedule will help update a schedule for a job. It does not attach the schedule to a job.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentSchedule</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job that has the schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleName</maml:name><maml:description><maml:para>The name of the schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Set the schedule to enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Set the schedule to disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values: 'Once', 'OneTime', 'Daily', 'Weekly', 'Monthly', 'MonthlyRelative', 'AgentStart', 'AutoStart', 'IdleComputer', 'OnIdle' The following synonyms provide flexibility to the allowed values for this function parameter: Once=OneTime AgentStart=AutoStart IdleComputer=OnIdle If force is used the default will be "Once".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyInterval</maml:name><maml:description><maml:para>The days that a job is executed Allowed values for FrequencyType 'Daily': EveryDay or a number between 1 and 365. Allowed values for FrequencyType 'Weekly': Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay. Allowed values for FrequencyType 'Monthly': Numbers 1 to 31 for each day of the month. If "Weekdays", "Weekend" or "EveryDay" is used it over writes any other value that has been passed before. If force is used the default will be 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are 1, 'Once', 'Time', 2, 'Seconds', 'Second', 4, 'Minutes', 'Minute', 8, 'Hours', 'Hour'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of a job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyType is 32 (MonthlyRelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Set the schedule to disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Set the schedule to enabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndDate</maml:name><maml:description><maml:para>The date on which execution of a job can stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndTime</maml:name><maml:description><maml:para>The time on any day to end execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>The force parameter will ignore some errors in the parameters and assume defaults. It will also remove the any present schedules with the same name for the specific job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyInterval</maml:name><maml:description><maml:para>The days that a job is executed Allowed values for FrequencyType 'Daily': EveryDay or a number between 1 and 365. Allowed values for FrequencyType 'Weekly': Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay. Allowed values for FrequencyType 'Monthly': Numbers 1 to 31 for each day of the month. If "Weekdays", "Weekend" or "EveryDay" is used it over writes any other value that has been passed before. If force is used the default will be 1.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRecurrenceFactor</maml:name><maml:description><maml:para>The number of weeks or months between the scheduled execution of a job. FrequencyRecurrenceFactor is used only if FrequencyType is 8, "Weekly", 16, "Monthly", 32 or "MonthlyRelative".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyRelativeInterval</maml:name><maml:description><maml:para>A job's occurrence of FrequencyInterval in each month, if FrequencyType is 32 (MonthlyRelative).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayInterval</maml:name><maml:description><maml:para>The number of subday type periods to occur between each execution of a job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval. Allowed values are 1, 'Once', 'Time', 2, 'Seconds', 'Second', 4, 'Minutes', 'Minute', 8, 'Hours', 'Hour'</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed. Allowed values: 'Once', 'OneTime', 'Daily', 'Weekly', 'Monthly', 'MonthlyRelative', 'AgentStart', 'AutoStart', 'IdleComputer', 'OnIdle' The following synonyms provide flexibility to the allowed values for this function parameter: Once=OneTime AgentStart=AutoStart IdleComputer=OnIdle If force is used the default will be "Once".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The name of the job that has the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ScheduleName</maml:name><maml:description><maml:para>The name of the schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>The date on which execution of a job can begin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartTime</maml:name><maml:description><maml:para>The time on any day to begin execution of a job. Format HHMMSS / 24 hour clock. Example: '010000' for 01:00:00 AM. Example: '140000' for 02:00:00 PM.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, JobStep Author: Sander Stad (@sqlstad, sqlstad.nl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentSchedule -SqlInstance sql1 -Job Job1 -ScheduleName daily -Enabled </dev:code><dev:remarks><maml:para> Changes the schedule for Job1 with the name 'daily' to enabled </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentSchedule -SqlInstance sql1 -Job Job1 -ScheduleName daily -NewName weekly -FrequencyType Weekly -FrequencyInterval Monday, Wednesday, Friday </dev:code><dev:remarks><maml:para> Changes the schedule for Job1 with the name daily to have a new name weekly </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentSchedule -SqlInstance sql1 -Job Job1, Job2, Job3 -ScheduleName daily -StartTime '230000' </dev:code><dev:remarks><maml:para> Changes the start time of the schedule for Job1 to 11 PM for multiple jobs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentSchedule -SqlInstance sql1, sql2, sql3 -Job Job1 -ScheduleName daily -Enabled </dev:code><dev:remarks><maml:para> Changes the schedule for Job1 with the name daily to enabled on multiple servers </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | Set-DbaAgentSchedule -Job Job1 -ScheduleName daily -Enabled </dev:code><dev:remarks><maml:para> Changes the schedule for Job1 with the name 'daily' to enabled on multiple servers using pipe line </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgentServer</command:name><command:noun>DbaAgentServer</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaAgentServer updates properties of a SQL Agent Server.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaAgentServer updates properties in the SQL Server Server with parameters supplied.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentServer</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping agent server objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentLogLevel</maml:name><maml:description><maml:para>Specifies the agent log level. Allowed values 1, "Errors", 2, "Warnings", 3, "Errors, Warnings", 4, "Informational", 5, "Errors, Informational", 6, "Warnings, Informational", 7, "All" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentMailType</maml:name><maml:description><maml:para>Specifies the agent mail type. Allowed values 0, "SqlAgentMail", 1, "DatabaseMail" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentShutdownWaitTime</maml:name><maml:description><maml:para>The Agent Shutdown Wait Time value of the server agent. The accepted value range is between 5 and 600.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseMailProfile</maml:name><maml:description><maml:para>The Database Mail Profile to be used. Must exists on database mail profiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorLogFile</maml:name><maml:description><maml:para>Error log file location</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IdleCpuDuration</maml:name><maml:description><maml:para>Idle CPU Duration value to be used. The accepted value range is between 20 and 86400.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IdleCpuPercentage</maml:name><maml:description><maml:para>Idle CPU Percentage value to be used. The accepted value range is between 10 and 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CpuPolling</maml:name><maml:description><maml:para>Enable or Disable the Polling. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalHostAlias</maml:name><maml:description><maml:para>The value for Local Host Alias configuration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginTimeout</maml:name><maml:description><maml:para>The value for Login Timeout configuration. The accepted value range is between 5 and 45.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumHistoryRows</maml:name><maml:description><maml:para>Indicates the Maximum job history log size (in rows). The acceptable value range is between 2 and 999999. To turn off the job history limitations use the value -1 and specify 0 for MaximumJobHistoryRows. See the example listed below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumJobHistoryRows</maml:name><maml:description><maml:para>Indicates the Maximum job history rows per job. The acceptable value range is between 2 and 999999. To turn off the job history limitations use the value 0 and specify -1 for MaximumHistoryRows. See the example listed below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendRecipient</maml:name><maml:description><maml:para>The Net send recipient value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceAlertTokens</maml:name><maml:description><maml:para>Enable or Disable the Token replacement property. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveInSentFolder</maml:name><maml:description><maml:para>Enable or Disable the copy of the sent messages is save in the Sent Items folder. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="18" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentAutoStart</maml:name><maml:description><maml:para>Enable or Disable the SQL Agent Auto Start. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="19" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentMailProfile</maml:name><maml:description><maml:para>The SQL Server Agent Mail Profile to be used. Must exists on database mail profiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="20" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentRestart</maml:name><maml:description><maml:para>Enable or Disable the SQL Agent Restart. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="21" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlServerRestart</maml:name><maml:description><maml:para>Enable or Disable the SQL Server Restart. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="22" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WriteOemErrorLog</maml:name><maml:description><maml:para>Enable or Disable the Write OEM Error Log. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentLogLevel</maml:name><maml:description><maml:para>Specifies the agent log level. Allowed values 1, "Errors", 2, "Warnings", 3, "Errors, Warnings", 4, "Informational", 5, "Errors, Informational", 6, "Warnings, Informational", 7, "All" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentMailType</maml:name><maml:description><maml:para>Specifies the agent mail type. Allowed values 0, "SqlAgentMail", 1, "DatabaseMail" The text value can either be lowercase, uppercase or something in between as long as the text is correct.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AgentShutdownWaitTime</maml:name><maml:description><maml:para>The Agent Shutdown Wait Time value of the server agent. The accepted value range is between 5 and 600.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CpuPolling</maml:name><maml:description><maml:para>Enable or Disable the Polling. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseMailProfile</maml:name><maml:description><maml:para>The Database Mail Profile to be used. Must exists on database mail profiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorLogFile</maml:name><maml:description><maml:para>Error log file location</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IdleCpuDuration</maml:name><maml:description><maml:para>Idle CPU Duration value to be used. The accepted value range is between 20 and 86400.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IdleCpuPercentage</maml:name><maml:description><maml:para>Idle CPU Percentage value to be used. The accepted value range is between 10 and 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping agent server objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobServer[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobServer[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalHostAlias</maml:name><maml:description><maml:para>The value for Local Host Alias configuration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LoginTimeout</maml:name><maml:description><maml:para>The value for Login Timeout configuration. The accepted value range is between 5 and 45.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumHistoryRows</maml:name><maml:description><maml:para>Indicates the Maximum job history log size (in rows). The acceptable value range is between 2 and 999999. To turn off the job history limitations use the value -1 and specify 0 for MaximumJobHistoryRows. See the example listed below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumJobHistoryRows</maml:name><maml:description><maml:para>Indicates the Maximum job history rows per job. The acceptable value range is between 2 and 999999. To turn off the job history limitations use the value 0 and specify -1 for MaximumHistoryRows. See the example listed below.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NetSendRecipient</maml:name><maml:description><maml:para>The Net send recipient value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReplaceAlertTokens</maml:name><maml:description><maml:para>Enable or Disable the Token replacement property. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SaveInSentFolder</maml:name><maml:description><maml:para>Enable or Disable the copy of the sent messages is save in the Sent Items folder. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentAutoStart</maml:name><maml:description><maml:para>Enable or Disable the SQL Agent Auto Start. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentMailProfile</maml:name><maml:description><maml:para>The SQL Server Agent Mail Profile to be used. Must exists on database mail profiles.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlAgentRestart</maml:name><maml:description><maml:para>Enable or Disable the SQL Agent Restart. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlServerRestart</maml:name><maml:description><maml:para>Enable or Disable the SQL Server Restart. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WriteOemErrorLog</maml:name><maml:description><maml:para>Enable or Disable the Write OEM Error Log. Allowed values Enabled, Disabled</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Server Author: Claudio Silva (@claudioessilva), claudioessilva.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1 -MaximumHistoryRows 10000 -MaximumJobHistoryRows 100 </dev:code><dev:remarks><maml:para> Changes the job history retention to 10000 rows with an maximum of 100 rows per job. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1 -CpuPolling Enabled </dev:code><dev:remarks><maml:para> Enable the CPU Polling configurations. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1, sql2, sql3 -AgentLogLevel 'Errors, Warnings' </dev:code><dev:remarks><maml:para> Set the agent log level to Errors and Warnings on multiple servers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1 -CpuPolling Disabled </dev:code><dev:remarks><maml:para> Disable the CPU Polling configurations. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1 -MaximumJobHistoryRows 1000 -MaximumHistoryRows 10000 </dev:code><dev:remarks><maml:para> Set the max history limitations. This is the equivalent to calling: EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000, @jobhistory_max_rows_per_job=1000 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgentServer -SqlInstance sql1 -MaximumJobHistoryRows 0 -MaximumHistoryRows -1 </dev:code><dev:remarks><maml:para> Disable the max history limitations. This is the equivalent to calling: EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=-1, @jobhistory_max_rows_per_job=0 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgentServer</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgListener</command:name><command:noun>DbaAgListener</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets a listener property for an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Sets a listener property for an availability group on a SQL Server instance.</maml:para><maml:para>Basically, only the port is settable at this time, so this command updates the listener port.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgListener</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The Availability Group to which a property will be changed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>Modify only specific listeners.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the port number used to communicate with the availability group.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The Availability Group to which a property will be changed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Listener</maml:name><maml:description><maml:para>Modify only specific listeners.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>Sets the port number used to communicate with the availability group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgListener -SqlInstance sql2017 -AvailabilityGroup SharePoint -Port 14333 </dev:code><dev:remarks><maml:para> Changes the port for the SharePoint AG Listener on sql2017. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgListener -SqlInstance sql2017 | Out-GridView -Passthru | Set-DbaAgListener -Port 1433 -Confirm:$false </dev:code><dev:remarks><maml:para> Changes the port for selected AG listeners to 1433. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgListener</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAgReplica</command:name><command:noun>DbaAgReplica</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the properties for a replica to an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the properties for a replica to an availability group on a SQL Server instance.</maml:para><maml:para>Automatically creates a database mirroring endpoint if required.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgReplica</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group of the replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>The replicas to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic and Manual.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Sets the connection intent modes of an Availability Replica in primary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Sets the connection modes of an Availability Replica in secondary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionTimeout</maml:name><maml:description><maml:para>How many seconds an availability replica waits for a ping response from a connected replica before considering the connection to have failed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The endpoint URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>Sets the read-only routing list for when this replica is in the primary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgReplica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityReplica</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group of the replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Sets the availability mode of the availability group replica. Options are: AsynchronousCommit and SynchronousCommit. SynchronousCommit is default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPriority</maml:name><maml:description><maml:para>Sets the backup priority availability group replica. Default is 50.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>Sets the connection intent modes of an Availability Replica in primary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>Sets the connection modes of an Availability Replica in secondary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The endpoint URL.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailoverMode</maml:name><maml:description><maml:para>Sets the failover mode of the availability group replica. Options are Automatic and Manual.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgReplica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityReplica</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>Sets the read only routing connection url for the availability replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>Sets the read-only routing list for when this replica is in the primary role.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Replica</maml:name><maml:description><maml:para>The replicas to modify.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Specifies how the secondary replica will be initially seeded. Automatic enables direct seeding. This method will seed the secondary replica over the network. This method does not require you to backup and restore a copy of the primary database on the replica. Manual requires you to create a backup of the database on the primary replica and manually restore that backup on the secondary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SessionTimeout</maml:name><maml:description><maml:para>How many seconds an availability replica waits for a ping response from a connected replica before considering the connection to have failed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAgReplica -SqlInstance sql2016 -Replica sql2016 -AvailabilityGroup SharePoint -BackupPriority 5000 </dev:code><dev:remarks><maml:para> Sets the backup priority to 5000 for the sql2016 replica for the SharePoint availability group on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2016 | Out-GridView -Passthru | Set-DbaAgReplica -BackupPriority 5000 </dev:code><dev:remarks><maml:para> Sets the backup priority to 5000 for the selected availability groups. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2016 -Replica Replica1 | </dev:code><dev:remarks><maml:para> >> Set-DbaAgReplica -ReadOnlyRoutingList Replica2, Replica3 Equivalent to running "ALTER AVAILABILITY GROUP... MODIFY REPLICA... (READ_ONLY_ROUTING_LIST = ('Replica2', 'Replica3'));" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgReplica -SqlInstance sql2016 -Replica Replica1 | </dev:code><dev:remarks><maml:para> >> Set-DbaAgReplica -ReadOnlyRoutingList @(,('Replica2','Replica3')); Equivalent to running "ALTER AVAILABILITY GROUP... MODIFY REPLICA... (READ_ONLY_ROUTING_LIST = (('Replica2', 'Replica3')));" setting a load balanced routing list for when Replica1 is the primary replica. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAgReplica</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets availability group properties on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Sets availability group properties on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAvailabilityGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only set specific availability group properties.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllAvailabilityGroups</maml:name><maml:description><maml:para>Set properties for all availability group on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DtcSupportEnabled</maml:name><maml:description><maml:para>Enables DtcSupport.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: External, Wsfc or None.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>Specifies how replicas in the primary role are treated in the evaluation to pick the desired replica to perform a backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Specifies the different conditions that can trigger an automatic failover in Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>This setting used to specify the length of time, in milliseconds, that the SQL Server resource DLL should wait for information returned by the sp_server_diagnostics stored procedure before reporting the Always On Failover Cluster Instance (FCI) as unresponsive. Changes that are made to the timeout settings are effective immediately and do not require a restart of the SQL Server resource. Defaults is 30000 (30 seconds).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BasicAvailabilityGroup</maml:name><maml:description><maml:para>Indicates whether the availability group is Basic Availability Group. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseHealthTrigger</maml:name><maml:description><maml:para>Indicates whether the availability group triggers the database health.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsDistributedAvailabilityGroup</maml:name><maml:description><maml:para>Indicates whether the availability group is distributed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllAvailabilityGroups</maml:name><maml:description><maml:para>Set properties for all availability group on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>Specifies how replicas in the primary role are treated in the evaluation to pick the desired replica to perform a backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>Only set specific availability group properties.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BasicAvailabilityGroup</maml:name><maml:description><maml:para>Indicates whether the availability group is Basic Availability Group. https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClusterType</maml:name><maml:description><maml:para>Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Options include: External, Wsfc or None.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DatabaseHealthTrigger</maml:name><maml:description><maml:para>Indicates whether the availability group triggers the database health.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DtcSupportEnabled</maml:name><maml:description><maml:para>Enables DtcSupport.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Specifies the different conditions that can trigger an automatic failover in Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>This setting used to specify the length of time, in milliseconds, that the SQL Server resource DLL should wait for information returned by the sp_server_diagnostics stored procedure before reporting the Always On Failover Cluster Instance (FCI) as unresponsive. Changes that are made to the timeout settings are effective immediately and do not require a restart of the SQL Server resource. Defaults is 30000 (30 seconds).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IsDistributedAvailabilityGroup</maml:name><maml:description><maml:para>Indicates whether the availability group is distributed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2016 | Set-DbaAvailabilityGroup -DtcSupportEnabled </dev:code><dev:remarks><maml:para> Enables DTC for all availability groups on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2016 -AvailabilityGroup AG1 | Set-DbaAvailabilityGroup -DtcSupportEnabled:$false </dev:code><dev:remarks><maml:para> Disables DTC support for the availability group AG1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaAvailabilityGroup -SqlInstance sql2016 -AvailabilityGroup AG1 -DtcSupportEnabled:$false </dev:code><dev:remarks><maml:para> Disables DTC support for the availability group AG1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaCmConnection</command:name><command:noun>DbaCmConnection</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Configures a connection object for use in remote computer management.</maml:para></maml:description></command:details><maml:description><maml:para>Configures a connection object for use in remote computer management.</maml:para><maml:para>This function will either create new records for computers that have no connection registered so far, or it will configure existing connections if already present.</maml:para><maml:para>As such it can be handy in making bulk-edits on connections or manually adjusting some settings.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaCmConnection</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential to register.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideConnectionPolicy</maml:name><maml:description><maml:para>Setting this will configure the connection policy override. By default, global configurations enforce, which connection type is available at all and which is disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WindowsCredentialsAreBad</maml:name><maml:description><maml:para>Will prevent the windows credentials of the currently logged on user from being used for the remote connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddBadCredential</maml:name><maml:description><maml:para>Adds credentials to the bad credential cache. These credentials will not be used when connecting to the target remote computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveBadCredential</maml:name><maml:description><maml:para>Removes credentials from the bad credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearBadCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that didn't worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetCredential</maml:name><maml:description><maml:para>Resets all credential-related caches: - Clears bad credential cache - Removes last working credential - Un-Confirms the windows credentials as working - Un-Confirms the windows credentials as not working Automatically implies the parameters -ClearCredential and -ClearBadCredential. Using them together is redundant. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConnectionStatus</maml:name><maml:description><maml:para>Restores all connection status to default, as if no connection protocol had ever been tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConfiguration</maml:name><maml:description><maml:para>Restores the configuration back to system default. Configuration elements are the basic behavior controlling settings, such as whether to cache bad credentials, etc. These can be configured globally using the dbatools configuration system and overridden locally on a per-connection basis. For a list of all available settings, use "Get-DbatoolsConfig -Module ComputerManagement".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaCmConnection</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseWindowsCredentials</maml:name><maml:description><maml:para>Whether using the default windows credentials is legit. Not setting this will not exclude using windows credentials, but only not pre-confirm them as working.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideConnectionPolicy</maml:name><maml:description><maml:para>Setting this will configure the connection policy override. By default, global configurations enforce, which connection type is available at all and which is disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddBadCredential</maml:name><maml:description><maml:para>Adds credentials to the bad credential cache. These credentials will not be used when connecting to the target remote computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveBadCredential</maml:name><maml:description><maml:para>Removes credentials from the bad credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearBadCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that didn't worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetCredential</maml:name><maml:description><maml:para>Resets all credential-related caches: - Clears bad credential cache - Removes last working credential - Un-Confirms the windows credentials as working - Un-Confirms the windows credentials as not working Automatically implies the parameters -ClearCredential and -ClearBadCredential. Using them together is redundant. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConnectionStatus</maml:name><maml:description><maml:para>Restores all connection status to default, as if no connection protocol had ever been tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConfiguration</maml:name><maml:description><maml:para>Restores the configuration back to system default. Configuration elements are the basic behavior controlling settings, such as whether to cache bad credentials, etc. These can be configured globally using the dbatools configuration system and overridden locally on a per-connection basis. For a list of all available settings, use "Get-DbatoolsConfig -Module ComputerManagement".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddBadCredential</maml:name><maml:description><maml:para>Adds credentials to the bad credential cache. These credentials will not be used when connecting to the target remote computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimDCOMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over DCOM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.DComSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.DComSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CimWinRMOptions</maml:name><maml:description><maml:para>Specify a set of options to use when connecting to the target computer using CIM over WinRM. Use 'New-CimSessionOption' to create such an object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.Management.Infrastructure.Options.WSManSessionOptions</command:parameterValue><dev:type><maml:name>Microsoft.Management.Infrastructure.Options.WSManSessionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearBadCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that didn't worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClearCredential</maml:name><maml:description><maml:para>Clears the cache of credentials that worked. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to build the connection object for.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential to register.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableBadCredentialCache</maml:name><maml:description><maml:para>Will prevent the caching of credentials if set to true.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCimPersistence</maml:name><maml:description><maml:para>Will prevent Cim-Sessions to be reused.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableCredentialAutoRegister</maml:name><maml:description><maml:para>Will prevent working credentials from being automatically cached</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisabledConnectionTypes</maml:name><maml:description><maml:para>Explicitly disable connection types. These types will then not be used for connecting to the computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableCredentialFailover</maml:name><maml:description><maml:para>Will enable automatic failing over to known to work credentials, when using bad credentials. By default, passing bad credentials will cause the Computer Management functions to interrupt with a warning (Or exception if in silent mode).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideConnectionPolicy</maml:name><maml:description><maml:para>Setting this will configure the connection policy override. By default, global configurations enforce, which connection type is available at all and which is disabled.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OverrideExplicitCredential</maml:name><maml:description><maml:para>Setting this will enable the credential override. The override will cause the system to ignore explicitly specified credentials, so long as known, good credentials are available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveBadCredential</maml:name><maml:description><maml:para>Removes credentials from the bad credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSCredential[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSCredential[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConfiguration</maml:name><maml:description><maml:para>Restores the configuration back to system default. Configuration elements are the basic behavior controlling settings, such as whether to cache bad credentials, etc. These can be configured globally using the dbatools configuration system and overridden locally on a per-connection basis. For a list of all available settings, use "Get-DbatoolsConfig -Module ComputerManagement".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetConnectionStatus</maml:name><maml:description><maml:para>Restores all connection status to default, as if no connection protocol had ever been tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResetCredential</maml:name><maml:description><maml:para>Resets all credential-related caches: - Clears bad credential cache - Removes last working credential - Un-Confirms the windows credentials as working - Un-Confirms the windows credentials as not working Automatically implies the parameters -ClearCredential and -ClearBadCredential. Using them together is redundant. Will be applied before adding entries to the credential cache.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseWindowsCredentials</maml:name><maml:description><maml:para>Whether using the default windows credentials is legit. Not setting this will not exclude using windows credentials, but only not pre-confirm them as working.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WindowsCredentialsAreBad</maml:name><maml:description><maml:para>Will prevent the windows credentials of the currently logged on user from being used for the remote connection.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection sql2014 | Set-DbaCmConnection -ClearBadCredential -UseWindowsCredentials </dev:code><dev:remarks><maml:para> Retrieves 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection | Set-DbaCmConnection -RemoveBadCredential $cred </dev:code><dev:remarks><maml:para> Removes the credentials stored in $cred from all connections' list of "known to not work" credentials. Handy to update changes in privilege. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaCmConnection | Export-Clixml .\connections.xml </dev:code><dev:remarks><maml:para> PS C:\> Import-Clixml .\connections.xml | Set-DbaCmConnection -ResetConfiguration At 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 to the connection cache. In 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. In 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaCmConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbCompatibility</command:name><command:noun>DbaDbCompatibility</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the compatibility level for SQL Server databases.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the current database compatibility level for all databases on a server or list of databases passed in to the function.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbCompatibility</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Compatibility</maml:name><maml:description><maml:para>The target compatibility level version. Same format as returned by Get-DbaDbCompatibility Version90 = SQL Server 2005 Version100 = SQL Server 2008 Version110 = SQL Server 2012 Version120 = SQL Server 2014 Version130 = SQL Server 2016 Version140 = SQL Server 2017 Version150 = SQL Server 2019</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.CompatibilityLevel</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.CompatibilityLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetCompatibility</maml:name><maml:description><maml:para>Deprecated parameter. Please use Compatibility instead. The target compatibility level version. This is an int and follows Microsoft's versioning: 9 = SQL Server 2005 10 = SQL Server 2008 11 = SQL Server 2012 12 = SQL Server 2014 13 = SQL Server 2016 14 = SQL Server 2017 15 = SQL Server 2019</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Compatibility</maml:name><maml:description><maml:para>The target compatibility level version. Same format as returned by Get-DbaDbCompatibility Version90 = SQL Server 2005 Version100 = SQL Server 2008 Version110 = SQL Server 2012 Version120 = SQL Server 2014 Version130 = SQL Server 2016 Version140 = SQL Server 2017 Version150 = SQL Server 2019</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.CompatibilityLevel</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.CompatibilityLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetCompatibility</maml:name><maml:description><maml:para>Deprecated parameter. Please use Compatibility instead. The target compatibility level version. This is an int and follows Microsoft's versioning: 9 = SQL Server 2005 10 = SQL Server 2008 11 = SQL Server 2012 12 = SQL Server 2014 13 = SQL Server 2016 14 = SQL Server 2017 15 = SQL Server 2019</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Compatibility, Database Author: Garry Bargsley, blog.garrybargsley.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompatibility -SqlInstance localhost\sql2017 </dev:code><dev:remarks><maml:para> Changes database compatibility level for all user databases on server localhost\sql2017 that have a Compatibility level that do not match </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompatibility -SqlInstance localhost\sql2017 -TargetCompatibility 12 </dev:code><dev:remarks><maml:para> Changes database compatibility level for all user databases on server localhost\sql2017 to Version120 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompatibility -SqlInstance localhost\sql2017 -Database Test -TargetCompatibility 12 </dev:code><dev:remarks><maml:para> Changes database compatibility level for database Test on server localhost\sql2017 to Version 120 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbCompatibility</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbCompression</command:name><command:noun>DbaDbCompression</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets tables and indexes with preferred compression setting.</maml:para></maml:description></command:details><maml:description><maml:para>This function sets the appropriate compression recommendation, determined either by using the Tiger Team's query or set to the CompressionType parameter.</maml:para><maml:para>Remember Uptime is critical for the Tiger Team query, the longer uptime, the more accurate the analysis is.</maml:para><maml:para>You would probably be best if you utilized Get-DbaUptime first, before running this command.</maml:para><maml:para>Set-DbaDbCompression script derived from GitHub and the tigertoolbox</maml:para><maml:para>(https://github.com/Microsoft/tigertoolbox/tree/master/Evaluate-Compression-Gains)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbCompression</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressionType</maml:name><maml:description><maml:para>Control the compression type applied. Default is 'Recommended' which uses the Tiger Team query to use the most appropriate setting per object. Other option is to compress all objects to either Row or Page.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxRunTime</maml:name><maml:description><maml:para>Will continue to alter tables and indexes for the given amount of minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PercentCompression</maml:name><maml:description><maml:para>Will only work on the tables/indexes that have the calculated savings at and higher for the given number provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the output of Test-DbaDbCompression as an object and applied compression based on those recommendations.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CompressionType</maml:name><maml:description><maml:para>Control the compression type applied. Default is 'Recommended' which uses the Tiger Team query to use the most appropriate setting per object. Other option is to compress all objects to either Row or Page.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Takes the output of Test-DbaDbCompression as an object and applied compression based on those recommendations.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxRunTime</maml:name><maml:description><maml:para>Will continue to alter tables and indexes for the given amount of minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PercentCompression</maml:name><maml:description><maml:para>Will only work on the tables/indexes that have the calculated savings at and higher for the given number provided.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) to process. If unspecified, all tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Compression, Table, Database Author: Jason Squires (@js_0505), jstexasdba@gmail.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompression -SqlInstance localhost -MaxRunTime 60 -PercentCompression 25 </dev:code><dev:remarks><maml:para> Set 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompression -SqlInstance ServerA -Database DBName -CompressionType Page -Table table1, table2 </dev:code><dev:remarks><maml:para> Utilizes Page compression for tables table1 and table2 in DBName on ServerA with no time limit. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbCompression -SqlInstance ServerA -Database DBName -PercentCompression 25 | Out-GridView </dev:code><dev:remarks><maml:para> Will 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $testCompression = Test-DbaDbCompression -SqlInstance ServerA -Database DBName </dev:code><dev:remarks><maml:para> PS C:\> Set-DbaDbCompression -SqlInstance ServerA -Database DBName -InputObject $testCompression Gets the compression suggestions from Test-DbaDbCompression into a variable, this can then be reviewed and passed into Set-DbaDbCompression. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Set-DbaDbCompression -SqlInstance ServerA -ExcludeDatabase Database -SqlCredential $cred -MaxRunTime 60 -PercentCompression 25 Set 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 higher between current and recommended will be compressed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\> foreach ($svr in $servers) { >> Set-DbaDbCompression -SqlInstance $svr -MaxRunTime 60 -PercentCompression 25 | Export-Csv -Path C:\temp\CompressionAnalysisPAC.csv -Append >> } Set 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 of command is exported to a csv. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbCompression</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbFileGroup</command:name><command:noun>DbaDbFileGroup</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the options for a filegroup.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the options for a filegroup for the specified database(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbFileGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name(s) of the filegroup(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Specifies if the filegroup should be the default. Only one filegroup in a database can be specified as the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Specifies the filegroup should be readonly. To change the filegroup to readwrite use -ReadOnly:$false</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoGrowAllFiles</maml:name><maml:description><maml:para>Specifies the filegroup should auto grow all files if one file has met the threshold to auto grow. To revert this setting use -AutoGrowAllFiles:$false</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase and Get-DbaDbFileGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoGrowAllFiles</maml:name><maml:description><maml:para>Specifies the filegroup should auto grow all files if one file has met the threshold to auto grow. To revert this setting use -AutoGrowAllFiles:$false</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Default</maml:name><maml:description><maml:para>Specifies if the filegroup should be the default. Only one filegroup in a database can be specified as the default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileGroup</maml:name><maml:description><maml:para>The name(s) of the filegroup(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase and Get-DbaDbFileGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>Specifies the filegroup should be readonly. To change the filegroup to readwrite use -ReadOnly:$false</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, File Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -Default -AutoGrowAllFiles </dev:code><dev:remarks><maml:para> Sets the HRFG1 filegroup to auto grow all files and makes it the default filegroup on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -AutoGrowAllFiles:$false </dev:code><dev:remarks><maml:para> Sets the HRFG1 filegroup to not auto grow all files on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -ReadOnly </dev:code><dev:remarks><maml:para> Sets the HRFG1 filegroup to read only on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 -ReadOnly:$false </dev:code><dev:remarks><maml:para> Sets the HRFG1 filegroup to read/write on the TestDb database on the sqldev1 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev1 -Database TestDb | Set-DbaDbFileGroup -FileGroup HRFG1 -AutoGrowAllFiles </dev:code><dev:remarks><maml:para> Passes in the TestDB database from the sqldev1 instance and sets the HRFG1 filegroup to auto grow all files. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbFileGroup -SqlInstance sqldev1 -Database TestDb -FileGroup HRFG1 | Set-DbaDbFileGroup -AutoGrowAllFiles </dev:code><dev:remarks><maml:para> Passes in the HRFG1 filegroup from the TestDB database on the sqldev1 instance and sets it to auto grow all files. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbFileGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbFileGrowth</command:name><command:noun>DbaDbFileGrowth</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets databases to a non-default growth and growth type. 64MB by default. To get the file growth, use Get-DbaDbFile.</maml:para></maml:description></command:details><maml:description><maml:para>Sets databases to a non-default growth and growth type. 64MB by default.</maml:para><maml:para>To get the file growth, use Get-DbaDbFile.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbFileGrowth</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GrowthType</maml:name><maml:description><maml:para>The growth type, MB by default - valid values are MB, KB, GB or TB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Growth</maml:name><maml:description><maml:para>The growth value. 64 by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Apply changes to only DATA, LOG or ALL files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the target databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileType</maml:name><maml:description><maml:para>Apply changes to only DATA, LOG or ALL files</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Growth</maml:name><maml:description><maml:para>The growth value. 64 by default.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GrowthType</maml:name><maml:description><maml:para>The growth type, MB by default - valid values are MB, KB, GB or TB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, Log, File, Growth Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGrowth -SqlInstance sql2016 -Database test -GrowthType GB -Growth 1 </dev:code><dev:remarks><maml:para> Sets the test database on sql2016 to a growth of 1GB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016 -Database test | Set-DbaDbFileGrowth -GrowthType GB -Growth 1 </dev:code><dev:remarks><maml:para> Sets the test database on sql2016 to a growth of 1GB </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase | Set-DbaDbFileGrowth -SqlInstance sql2017, sql2016, sql2012 </dev:code><dev:remarks><maml:para> Sets all database files on sql2017, sql2016, sql2012 to 64MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGrowth -SqlInstance sql2017, sql2016, sql2012 -Database test -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbFileGrowth -SqlInstance sql2017 -Database test -GrowthType GB -Growth 1 -FileType Data </dev:code><dev:remarks><maml:para> Sets growth to 1GB for only data files for database test </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbFileGrowth</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbIdentity</command:name><command:noun>DbaDbIdentity</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Checks and updates the current identity value via DBCC CHECKIDENT</maml:para></maml:description></command:details><maml:description><maml:para>Use the command DBCC CHECKIDENT to check and if necessary update the current identity value of a table and return results</maml:para><maml:para>Can update an individual table via the ReSeedValue and RESEED option of DBCC CHECKIDENT</maml:para><maml:para>Read more:</maml:para><maml:para> - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkident-transact-sql</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbIdentity</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed. Only one database should be specified when using a RESEED value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) for which to check the current identity value. Only one table should be specified when using a RESEED value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReSeedValue</maml:name><maml:description><maml:para>The new reseed value to be used to set as the current identity value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed. Only one database should be specified when using a RESEED value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReSeedValue</maml:name><maml:description><maml:para>The new reseed value to be used to set as the current identity value.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table(s) for which to check the current identity value. Only one table should be specified when using a RESEED value</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DBCC Author: Patrick Flynn (@sqllensman) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbIdentity -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Table 'Production.ScrapReason' </dev:code><dev:remarks><maml:para> Connects to AdventureWorks2014 on instance SqlServer2017 using Windows Authentication and runs the command DBCC CHECKIDENT('Production.ScrapReason') to return the current identity value. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> 'Sql1','Sql2/sqlexpress' | Set-DbaDbIdentity -SqlCredential $cred -Database AdventureWorks2014 -Table 'Production.ScrapReason' Connects to AdventureWorks2014 on instances Sql1 and Sql2/sqlexpress using sqladmin credential and runs the command DBCC CHECKIDENT('Production.ScrapReason') to return the current identity value. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $query = "Select Schema_Name(t.schema_id) +'.' + t.name as TableName from sys.columns c INNER JOIN sys.tables t on t.object_id = c.object_id WHERE is_identity = 1" </dev:code><dev:remarks><maml:para> PS C:\> $IdentityTables = Invoke-DbaQuery -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Query $query PS C:\> foreach ($tbl in $IdentityTables) { PS C:\> Set-DbaDbIdentity -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Table $tbl.TableName PS C:\> } Checks the current identity value for all tables with an Identity in the AdventureWorks2014 database on the SQLServer2017 and, if it is needed, changes the identity value. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbIdentity</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbMirror</command:name><command:noun>DbaDbMirror</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets properties of database mirrors.</maml:para></maml:description></command:details><maml:description><maml:para>Sets properties of database mirrors.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbMirror</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Partner</maml:name><maml:description><maml:para>Sets the partner Fully Qualified Domain Name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Witness</maml:name><maml:description><maml:para>Sets the witness Fully Qualified Domain Name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SafetyLevel</maml:name><maml:description><maml:para>Sets the mirroring safety level.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>State</maml:name><maml:description><maml:para>Sets the mirror state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Partner</maml:name><maml:description><maml:para>Sets the partner Fully Qualified Domain Name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SafetyLevel</maml:name><maml:description><maml:para>Sets the mirroring safety level.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>State</maml:name><maml:description><maml:para>Sets the mirror state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Witness</maml:name><maml:description><maml:para>Sets the witness Fully Qualified Domain Name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Mirroring, Mirror, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbMirror -SqlInstance sql2005 -Database dbatools -Partner TCP://SQL2008.ad.local:5374 </dev:code><dev:remarks><maml:para> Prompts for confirmation then sets the partner to TCP://SQL2008.ad.local:5374 for the database "dbtools" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbMirror -SqlInstance sql2005 -Database dbatools -Witness TCP://SQL2012.ad.local:5502 -Confirm:$false </dev:code><dev:remarks><maml:para> Does not prompt for confirmation and sets the witness to TCP://SQL2012.ad.local:5502 for the database "dbtools" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2005 | Out-GridView -PassThru | Set-DbaDbMirror -SafetyLevel Full -Confirm:$false </dev:code><dev:remarks><maml:para> Sets the safety level to Full for databases selected from a grid view. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbMirror -SqlInstance sql2005 -Database dbatools -State Suspend -Confirm:$false </dev:code><dev:remarks><maml:para> Does not prompt for confirmation and sets the state to suspend for the database "dbtools" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbMirror</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbOwner</command:name><command:noun>DbaDbOwner</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets database owners with a desired login if databases do not match that owner.</maml:para></maml:description></command:details><maml:description><maml:para>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 'sa', 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).</maml:para><maml:para>Best Practice reference: http://weblogs.sqlteam.com/dang/archive/2008/01/13/Database-Owner-Troubles.aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbOwner</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogin</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogin</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Owner, DbOwner Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbOwner -SqlInstance localhost </dev:code><dev:remarks><maml:para> Sets database owner to 'sa' on all databases where the owner does not match 'sa'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbOwner -SqlInstance localhost -TargetLogin DOMAIN\account </dev:code><dev:remarks><maml:para> Sets the database owner to DOMAIN\account on all databases where the owner does not match DOMAIN\account. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbOwner -SqlInstance sqlserver -Database db1, db2 </dev:code><dev:remarks><maml:para> Sets database owner to 'sa' on the db1 and db2 databases if their current owner does not match 'sa'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $db = Get-DbaDatabase -SqlInstance localhost -Database db1, db2 </dev:code><dev:remarks><maml:para> PS C:\> $db | Set-DbaDbOwner -TargetLogin DOMAIN\account Sets database owner to 'sa' on the db1 and db2 databases if their current owner does not match 'sa'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbOwner</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbQueryStoreOption</command:name><command:noun>DbaDbQueryStoreOption</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Configure Query Store settings for a specific or multiple databases.</maml:para></maml:description></command:details><maml:description><maml:para>Configure Query Store settings for a specific or multiple databases.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbQueryStoreOption</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>State</maml:name><maml:description><maml:para>Set the state of the Query Store. Valid options are "ReadWrite", "ReadOnly" and "Off".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FlushInterval</maml:name><maml:description><maml:para>Set the flush to disk interval of the Query Store in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionInterval</maml:name><maml:description><maml:para>Set the runtime statistics collection interval of the Query Store in minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSize</maml:name><maml:description><maml:para>Set the maximum size of the Query Store in MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaptureMode</maml:name><maml:description><maml:para>Set the query capture mode of the Query Store. Valid options are "Auto" and "All".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CleanupMode</maml:name><maml:description><maml:para>Set the query cleanup mode policy. Valid options are "Auto" and "Off".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StaleQueryThreshold</maml:name><maml:description><maml:para>Set the stale query threshold in days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPlansPerQuery</maml:name><maml:description><maml:para>Set the max plans per query captured and kept.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitStatsCaptureMode</maml:name><maml:description><maml:para>Set wait stats capture on or off.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyExecutionCount</maml:name><maml:description><maml:para>Set the custom capture policy execution count. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyTotalCompileCPUTimeMS</maml:name><maml:description><maml:para>Set the custom capture policy total compile CPU time. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyTotalExecutionCPUTimeMS</maml:name><maml:description><maml:para>Set the custom capture policy total execution CPU time. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyStaleThresholdHours</maml:name><maml:description><maml:para>Set the custom capture policy stale threshold. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>Run command against all user databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CaptureMode</maml:name><maml:description><maml:para>Set the query capture mode of the Query Store. Valid options are "Auto" and "All".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CleanupMode</maml:name><maml:description><maml:para>Set the query cleanup mode policy. Valid options are "Auto" and "Off".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectionInterval</maml:name><maml:description><maml:para>Set the runtime statistics collection interval of the Query Store in minutes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyExecutionCount</maml:name><maml:description><maml:para>Set the custom capture policy execution count. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyStaleThresholdHours</maml:name><maml:description><maml:para>Set the custom capture policy stale threshold. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyTotalCompileCPUTimeMS</maml:name><maml:description><maml:para>Set the custom capture policy total compile CPU time. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomCapturePolicyTotalExecutionCPUTimeMS</maml:name><maml:description><maml:para>Set the custom capture policy total execution CPU time. Only available in SQL Server 2019 and above.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FlushInterval</maml:name><maml:description><maml:para>Set the flush to disk interval of the Query Store in seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxPlansPerQuery</maml:name><maml:description><maml:para>Set the max plans per query captured and kept.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSize</maml:name><maml:description><maml:para>Set the maximum size of the Query Store in MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>SqlLogin to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StaleQueryThreshold</maml:name><maml:description><maml:para>Set the stale query threshold in days.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>State</maml:name><maml:description><maml:para>Set the state of the Query Store. Valid options are "ReadWrite", "ReadOnly" and "Off".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitStatsCaptureMode</maml:name><maml:description><maml:para>Set wait stats capture on or off.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: QueryStore Author: Enrico van de Laar (@evdlaar) | Tracy Boggiano (@TracyBoggiano) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbQueryStoreOption -SqlInstance ServerA\SQL -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode All -CleanupMode Auto -StaleQueryThreshold 100 -AllDatabases </dev:code><dev:remarks><maml:para> Configure the Query Store settings for all user databases in the ServerA\SQL Instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbQueryStoreOption -SqlInstance ServerA\SQL -FlushInterval 600 </dev:code><dev:remarks><maml:para> Only configure the FlushInterval setting for all Query Store databases in the ServerA\SQL Instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbQueryStoreOption -SqlInstance ServerA\SQL -Database AdventureWorks -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode all -CleanupMode Auto -StaleQueryThreshold 100 </dev:code><dev:remarks><maml:para> Configure the Query Store settings for the AdventureWorks database in the ServerA\SQL Instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbQueryStoreOption -SqlInstance ServerA\SQL -Exclude AdventureWorks -State ReadWrite -FlushInterval 600 -CollectionInterval 10 -MaxSize 100 -CaptureMode all -CleanupMode Auto -StaleQueryThreshold 100 </dev:code><dev:remarks><maml:para> Configure the Query Store settings for all user databases except the AdventureWorks database in the ServerA\SQL Instance. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbQueryStoreOption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbRecoveryModel</command:name><command:noun>DbaDbRecoveryModel</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaDbRecoveryModel sets the Recovery Model.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaDbRecoveryModel sets the Recovery Model for all databases except TEMPDB.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbRecoveryModel</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Recovery Model to be set. Valid options are 'Simple', 'Full', 'BulkLogged' Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaDbRecoveryModel</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Recovery Model to be set. Valid options are 'Simple', 'Full', 'BulkLogged' Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaDbRecoveryModel</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Recovery Model to be set. Valid options are 'Simple', 'Full', 'BulkLogged' Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Recovery Model to be set. Valid options are 'Simple', 'Full', 'BulkLogged' Details about the recovery models can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: RecoveryModel, Database Author: Viorel Ciucu (@viorelciucu), cviorel.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Database model -Confirm:$true -Verbose </dev:code><dev:remarks><maml:para> Sets the Recovery Model to BulkLogged for database [model] on SQL Server instance sql2014. User is requested to confirm the action. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2014 -Database TestDB | Set-DbaDbRecoveryModel -RecoveryModel Simple -Confirm:$false </dev:code><dev:remarks><maml:para> Sets the Recovery Model to Simple for database [TestDB] on SQL Server instance sql2014. Confirmation is not required. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel Simple -Database TestDB -Confirm:$false </dev:code><dev:remarks><maml:para> Sets the Recovery Model to Simple for database [TestDB] on SQL Server instance sql2014. Confirmation is not required. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel Simple -AllDatabases -Confirm:$false </dev:code><dev:remarks><maml:para> Sets the Recovery Model to Simple for ALL user and system databases (except TEMPDB) on SQL Server instance sql2014. Runs without asking for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbRecoveryModel -SqlInstance sql2014 -RecoveryModel BulkLogged -Database TestDB1, TestDB2 -Confirm:$false -Verbose </dev:code><dev:remarks><maml:para> Sets the Recovery Model to BulkLogged for [TestDB1] and [TestDB2] databases on SQL Server instance sql2014. Runs without asking for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbRecoveryModel</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbSchema</command:name><command:noun>DbaDbSchema</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Updates the owner for one or more schemas.</maml:para></maml:description></command:details><maml:description><maml:para>Updates the owner for one or more schemas.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbSchema</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name of the database user that will own the schema(s).</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name(s) of the schema(s)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SchemaOwner</maml:name><maml:description><maml:para>The name of the database user that will own the schema(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Schema, Database Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbSchema -SqlInstance sqldev01 -Database example1 -Schema TestSchema1 -SchemaOwner dbatools </dev:code><dev:remarks><maml:para> Updates the TestSchema1 schema in the example1 database in the sqldev01 instance. The dbatools user will be the new owner of the schema. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01, sqldev02 -Database example1 | Set-DbaDbSchema -Schema TestSchema1, TestSchema2 -SchemaOwner dbatools </dev:code><dev:remarks><maml:para> Passes in the example1 db via pipeline and updates the TestSchema1 and TestSchema2 schemas and assigns the dbatools user as the owner of the schemas. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbSchema</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbSequence</command:name><command:noun>DbaDbSequence</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Modifies a sequence.</maml:para></maml:description></command:details><maml:description><maml:para>Modifies a sequence in the database(s) specified.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbSequence</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the new sequence</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartWith</maml:name><maml:description><maml:para>The first value for the sequence to restart with.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementBy</maml:name><maml:description><maml:para>The value to increment by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinValue</maml:name><maml:description><maml:para>The minimum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>The maximum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cycle</maml:name><maml:description><maml:para>Switch that indicates if the sequence should cycle the values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CacheSize</maml:name><maml:description><maml:para>The integer size of the cache. To specify NO CACHE for a sequence use -CacheSize 0. As noted in the Microsoft documentation if the cache size is not specified the Database Engine will select a size.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CacheSize</maml:name><maml:description><maml:para>The integer size of the cache. To specify NO CACHE for a sequence use -CacheSize 0. As noted in the Microsoft documentation if the cache size is not specified the Database Engine will select a size.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cycle</maml:name><maml:description><maml:para>Switch that indicates if the sequence should cycle the values</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The target database(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncrementBy</maml:name><maml:description><maml:para>The value to increment by.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxValue</maml:name><maml:description><maml:para>The maximum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinValue</maml:name><maml:description><maml:para>The minimum bound for the sequence.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartWith</maml:name><maml:description><maml:para>The first value for the sequence to restart with.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Long</command:parameterValue><dev:type><maml:name>Long</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>The name of the schema for the sequence. The default is dbo.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Sequence</maml:name><maml:description><maml:para>The name of the new sequence</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Data, Sequence, Table Author: Adam Lancaster, github.com/lancasteradam dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbSequence -SqlInstance sqldev01 -Database TestDB -Sequence TestSequence -RestartWith 10000 -IncrementBy 10 </dev:code><dev:remarks><maml:para> Modifies the sequence TestSequence in the TestDB database on the sqldev01 instance. The sequence will restart with 10000 and increment by 10. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqldev01 -Database TestDB | Set-DbaDbSequence -Sequence TestSequence -Schema TestSchema -Cycle </dev:code><dev:remarks><maml:para> Using a pipeline this command modifies the sequence named TestSchema.TestSequence in the TestDB database on the sqldev01 instance. The sequence will now cycle the sequence values. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbSequence</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDbState</command:name><command:noun>DbaDbState</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets various options for databases, hereby called "states"</maml:para></maml:description></command:details><maml:description><maml:para>Sets some common "states" on databases:</maml:para><maml:para>- "RW" options (ReadOnly, ReadWrite)</maml:para><maml:para>- "Status" options (Online, Offline, Emergency, plus a special "Detached")</maml:para><maml:para>- "Access" options (SingleUser, RestrictedUser, MultiUser)</maml:para><maml:para>Returns an object with SqlInstance, Database, RW, Status, Access, Notes</maml:para><maml:para>Notes gets filled when something went wrong setting the state</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDbState</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_ONLY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadWrite</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_WRITE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Online</maml:name><maml:description><maml:para>Status Option : Sets the database as ONLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Status Option : Sets the database as OFFLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Emergency</maml:name><maml:description><maml:para>Status Option : Sets the database as EMERGENCY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detached</maml:name><maml:description><maml:para>Status Option : Detaches the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Access Option : Sets the database as SINGLE_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Access Option : Sets the database as RESTRICTED_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiUser</maml:name><maml:description><maml:para>Access Option : Sets the database as MULTI_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>For most options, this translates to instantly rolling back any open transactions that may be stopping the process. For -Detached it is required to break mirroring and Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaDbState</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_ONLY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadWrite</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_WRITE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Online</maml:name><maml:description><maml:para>Status Option : Sets the database as ONLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Status Option : Sets the database as OFFLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Emergency</maml:name><maml:description><maml:para>Status Option : Sets the database as EMERGENCY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detached</maml:name><maml:description><maml:para>Status Option : Detaches the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Access Option : Sets the database as SINGLE_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Access Option : Sets the database as RESTRICTED_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiUser</maml:name><maml:description><maml:para>Access Option : Sets the database as MULTI_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>For most options, this translates to instantly rolling back any open transactions that may be stopping the process. For -Detached it is required to break mirroring and Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaDbState</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_ONLY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadWrite</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_WRITE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Online</maml:name><maml:description><maml:para>Status Option : Sets the database as ONLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Status Option : Sets the database as OFFLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Emergency</maml:name><maml:description><maml:para>Status Option : Sets the database as EMERGENCY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detached</maml:name><maml:description><maml:para>Status Option : Detaches the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Access Option : Sets the database as SINGLE_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Access Option : Sets the database as RESTRICTED_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiUser</maml:name><maml:description><maml:para>Access Option : Sets the database as MULTI_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>For most options, this translates to instantly rolling back any open transactions that may be stopping the process. For -Detached it is required to break mirroring and Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped database objects</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>This is a parameter that was included for safety, so you don't accidentally set options on all databases without specifying</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. if unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Detached</maml:name><maml:description><maml:para>Status Option : Detaches the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Emergency</maml:name><maml:description><maml:para>Status Option : Sets the database as EMERGENCY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>For most options, this translates to instantly rolling back any open transactions that may be stopping the process. For -Detached it is required to break mirroring and Availability Groups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts piped database objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MultiUser</maml:name><maml:description><maml:para>Access Option : Sets the database as MULTI_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Status Option : Sets the database as OFFLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Online</maml:name><maml:description><maml:para>Status Option : Sets the database as ONLINE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadOnly</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_ONLY</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReadWrite</maml:name><maml:description><maml:para>RW Option : Sets the database as READ_WRITE</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Access Option : Sets the database as RESTRICTED_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Access Option : Sets the database as SINGLE_USER</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, State Author: Simone Bizzotto (@niphold) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbState -SqlInstance sqlserver2014a -Database HR -Offline </dev:code><dev:remarks><maml:para> Sets the HR database as OFFLINE </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbState -SqlInstance sqlserver2014a -AllDatabases -Exclude HR -ReadOnly -Force </dev:code><dev:remarks><maml:para> Sets all databases of the sqlserver2014a instance, except for HR, as READ_ONLY </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbState -SqlInstance sql2016 | Where-Object Status -eq 'Offline' | Set-DbaDbState -Online </dev:code><dev:remarks><maml:para> Finds all offline databases and sets them to online </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbState -SqlInstance sqlserver2014a -Database HR -SingleUser </dev:code><dev:remarks><maml:para> Sets the HR database as SINGLE_USER </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDbState -SqlInstance sqlserver2014a -Database HR -SingleUser -Force </dev:code><dev:remarks><maml:para> Sets the HR database as SINGLE_USER, dropping all other connections (and rolling back open transactions) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2014a -Database HR | Set-DbaDbState -SingleUser -Force </dev:code><dev:remarks><maml:para> Gets the databases from Get-DbaDatabase, and sets them as SINGLE_USER, dropping all other connections (and rolling back open transactions) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDbState</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaDefaultPath</command:name><command:noun>DbaDefaultPath</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the default SQL Server paths for data, logs, and backups</maml:para></maml:description></command:details><maml:description><maml:para>Sets the default SQL Server paths for data, logs, and backups</maml:para><maml:para>To change the error log location, use Set-DbaStartupParameter</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaDefaultPath</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of path to modify. Options include: Data, Log and Backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path on the destination SQL Server</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path on the destination SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of path to modify. Options include: Data, Log and Backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Data, Logs, Backup Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDefaultPath -SqlInstance sql01\sharepoint -Type Data, Backup -Path C:\mssql\sharepoint\data </dev:code><dev:remarks><maml:para> Sets the data and backup default paths on sql01\sharepoint to C:\mssql\sharepoint\data </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaDefaultPath -SqlInstance sql01\sharepoint -Type Data, Log -Path C:\mssql\sharepoint\data -WhatIf </dev:code><dev:remarks><maml:para> Shows what what happen if the command would have run </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaDefaultPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets endpoint properties on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Sets endpoint properties on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaEndpoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only set specific endpoint properties.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Change the endpoint owner.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Change the endpoint type. Options: DatabaseMirroring, ServiceBroker, Soap, TSql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Set all endpoint properties on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Set all endpoint properties on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only set specific endpoint properties.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Owner</maml:name><maml:description><maml:para>Change the endpoint owner.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Change the endpoint type. Options: DatabaseMirroring, ServiceBroker, Soap, TSql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaEndpoint -SqlInstance sql2016 -AllEndpoints -Owner sa </dev:code><dev:remarks><maml:para> Sets all endpoint owners to sa on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEndpoint -SqlInstance sql2016 -Endpoint ep1 | Set-DbaEndpoint -Type TSql </dev:code><dev:remarks><maml:para> Changes the endpoint type to Tsql on endpoint ep1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaErrorLogConfig</command:name><command:noun>DbaErrorLogConfig</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set the configuration for the ErrorLog on a given SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Sets the number of log files configured on all versions, and size in KB in SQL Server 2012+ and above.</maml:para><maml:para>To set the Path to the ErrorLog, use Set-DbaStartupParameter -ErrorLog. Note that this command requires</maml:para><maml:para>remote, administrative access to the Windows/WMI server, similar to SQL Configuration Manager.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaErrorLogConfig</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogCount</maml:name><maml:description><maml:para>Integer value between 6 and 99 for setting the number of error log files to keep for SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogSize</maml:name><maml:description><maml:para>Integer value for the size in KB that you want the error log file to grow. This is feature only in SQL Server 2012 and higher. When the file reaches that limit SQL Server will roll the error log over.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogCount</maml:name><maml:description><maml:para>Integer value between 6 and 99 for setting the number of error log files to keep for SQL Server instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogSize</maml:name><maml:description><maml:para>Integer value for the size in KB that you want the error log file to grow. This is feature only in SQL Server 2012 and higher. When the file reaches that limit SQL Server will roll the error log over.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, ErrorLog, Logging Author: Shawn Melton (@wsmelton), wsmelton.github.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaErrorLogConfig -SqlInstance sql2017,sql2014 -LogCount 25 </dev:code><dev:remarks><maml:para> Sets the number of error log files to 25 on sql2017 and sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaErrorLogConfig -SqlInstance sql2014 -LogSize 102400 </dev:code><dev:remarks><maml:para> Sets the size of the error log file, before it rolls over, to 102400 KB (100 MB) on sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaErrorLogConfig -SqlInstance sql2012 -LogCount 25 -LogSize 500 </dev:code><dev:remarks><maml:para> Sets the number of error log files to 25 and size before it will roll over to 500 KB on sql2012 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaErrorLogConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaExtendedProperty</command:name><command:noun>DbaExtendedProperty</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set extended property values</maml:para></maml:description></command:details><maml:description><maml:para>Set extended property values</maml:para><maml:para>You can set extended properties on all these different types of objects:</maml:para><maml:para>Aggregate</maml:para><maml:para>Assembly</maml:para><maml:para>Column</maml:para><maml:para>Constraint</maml:para><maml:para>Contract</maml:para><maml:para>Database</maml:para><maml:para>Event Notification</maml:para><maml:para>Filegroup</maml:para><maml:para>Function</maml:para><maml:para>Index</maml:para><maml:para>Logical File Name</maml:para><maml:para>Message Type</maml:para><maml:para>Parameter</maml:para><maml:para>Partition Function</maml:para><maml:para>Partition Scheme</maml:para><maml:para>Procedure</maml:para><maml:para>Queue</maml:para><maml:para>Remote Service Binding</maml:para><maml:para>Route</maml:para><maml:para>Rule</maml:para><maml:para>Schema</maml:para><maml:para>Service</maml:para><maml:para>Synonym</maml:para><maml:para>Table</maml:para><maml:para>Trigger</maml:para><maml:para>Type</maml:para><maml:para>View</maml:para><maml:para>Xml Schema Collection</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaExtendedProperty</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaExtendedProperty</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The new value for the extended property</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaExtendedProperty</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.ExtendedProperty[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The new value for the extended property</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: General, ExtendedProperties Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -Database mydb | Get-DbaExtendedProperty -Name appversion | Set-DbaExtendedProperty -Value "1.1.0" </dev:code><dev:remarks><maml:para> Sets the value of appversion to 1.1.0 on the mydb database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDbTable -SqlInstance localhost -Database mydb -Table mytable | Get-DbaExtendedProperty -Name appversion | Set-DbaExtendedProperty -Value "1.1.0" </dev:code><dev:remarks><maml:para> Sets the value of appversion to 1.1.0 on the mytable table of the mydb database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaExtendedProperty</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaExtendedProtection</command:name><command:noun>DbaExtendedProtection</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set the Extended Protection setting of the SQL Server network configuration.</maml:para></maml:description></command:details><maml:description><maml:para>Set the Extended Protection setting of the SQL Server network configuration.</maml:para><maml:para>This setting requires access to the Windows Server and not the SQL Server instance. The setting is found in SQL Server Configuration Manager under the properties of SQL Server Network Configuration > Protocols for "InstanceName".</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaExtendedProtection</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>Posible values are Off, Allowed and Always.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not SQL Server instance) using alternative Windows credentials</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>Posible values are Off, Allowed and Always.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Instance, Security Author: Claudio Silva (@claudioessilva), claudioessilva.eu Website: https://dbatools.io Copyright: (c) 2019 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaExtendedProtection </dev:code><dev:remarks><maml:para> Set Extended Protection of SQL Engine on the default (MSSQLSERVER) instance on localhost to "Off". Requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaExtendedProtection -Value Required </dev:code><dev:remarks><maml:para> Set Extended Protection of SQL Engine on the default (MSSQLSERVER) instance on localhost to "Required". Requires (and checks for) RunAs admin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaExtendedProtection -SqlInstance sql01\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Set Extended Protection of SQL Engine for the SQL2008R2SP2 on sql01 to "Off". Uses Windows Credentials to both connect and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaExtendedProtection -SqlInstance sql01\SQL2008R2SP2 -Value Allowed </dev:code><dev:remarks><maml:para> Set Extended Protection of SQL Engine for the SQL2008R2SP2 on sql01 to "Allowed". Uses Windows Credentials to both connect and modify the registry. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaExtendedProtection -SqlInstance sql01\SQL2008R2SP2 -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaExtendedProtection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaLogin</command:name><command:noun>DbaLogin</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Set-DbaLogin makes it possible to make changes to one or more logins. SQL Azure DB is not supported.</maml:para></maml:description></command:details><maml:description><maml:para>Set-DbaLogin will enable you to change the password, unlock, rename, disable or enable, deny or grant login privileges to the login. It's also possible to add or remove server roles from the login.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login that needs to be changed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The new password for the login This can be either a credential or a secure string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>Default database for the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unlock</maml:name><maml:description><maml:para>Switch to unlock an account. This can be used in conjunction with the -SecurePassword or -Force parameters. The default is false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordMustChange</maml:name><maml:description><maml:para>Does the user need to change his/her password. This will only be used in conjunction with the -SecurePassword parameter. It is required that the login have both PasswordPolicyEnforced (check_policy) and PasswordExpirationEnabled (check_expiration) enabled for the login. See the Microsoft documentation for ALTER LOGIN for more details. The default is false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disable</maml:name><maml:description><maml:para>Disable the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enable</maml:name><maml:description><maml:para>Enable the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyLogin</maml:name><maml:description><maml:para>Deny access to SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GrantLogin</maml:name><maml:description><maml:para>Grant access to SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Enable the password policy on the login (check_policy = ON). This option must be enabled in order for -PasswordExpirationEnabled to be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordExpirationEnabled</maml:name><maml:description><maml:para>Enable the password expiration check on the login (check_expiration = ON). In order to enable this option the PasswordPolicyEnforced (check_policy) must also be enabled for the login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddRole</maml:name><maml:description><maml:para>Add one or more server roles to the login The following roles can be used "bulkadmin", "dbcreator", "diskadmin", "processadmin", "public", "securityadmin", "serveradmin", "setupadmin", "sysadmin".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveRole</maml:name><maml:description><maml:para>Remove one or more server roles to the login The following roles can be used "bulkadmin", "dbcreator", "diskadmin", "processadmin", "public", "securityadmin", "serveradmin", "setupadmin", "sysadmin".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows logins to be piped in from Get-DbaLogin</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>This switch is used with -Unlock to unlock a login without providing a password. This command will temporarily disable and enable the policy settings as described at https://www.mssqltips.com/sqlservertip/2758/how-to-unlock-a-sql-login-without-resetting-the-password/.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddRole</maml:name><maml:description><maml:para>Add one or more server roles to the login The following roles can be used "bulkadmin", "dbcreator", "diskadmin", "processadmin", "public", "securityadmin", "serveradmin", "setupadmin", "sysadmin".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDatabase</maml:name><maml:description><maml:para>Default database for the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DenyLogin</maml:name><maml:description><maml:para>Deny access to SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disable</maml:name><maml:description><maml:para>Disable the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enable</maml:name><maml:description><maml:para>Enable the login</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>This switch is used with -Unlock to unlock a login without providing a password. This command will temporarily disable and enable the policy settings as described at https://www.mssqltips.com/sqlservertip/2758/how-to-unlock-a-sql-login-without-resetting-the-password/.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GrantLogin</maml:name><maml:description><maml:para>Grant access to SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows logins to be piped in from Get-DbaLogin</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login that needs to be changed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NewName</maml:name><maml:description><maml:para>The new name for the login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordExpirationEnabled</maml:name><maml:description><maml:para>Enable the password expiration check on the login (check_expiration = ON). In order to enable this option the PasswordPolicyEnforced (check_policy) must also be enabled for the login.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordMustChange</maml:name><maml:description><maml:para>Does the user need to change his/her password. This will only be used in conjunction with the -SecurePassword parameter. It is required that the login have both PasswordPolicyEnforced (check_policy) and PasswordExpirationEnabled (check_expiration) enabled for the login. See the Microsoft documentation for ALTER LOGIN for more details. The default is false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Enable the password policy on the login (check_policy = ON). This option must be enabled in order for -PasswordExpirationEnabled to be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RemoveRole</maml:name><maml:description><maml:para>Remove one or more server roles to the login The following roles can be used "bulkadmin", "dbcreator", "diskadmin", "processadmin", "public", "securityadmin", "serveradmin", "setupadmin", "sysadmin".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>The new password for the login This can be either a credential or a secure string.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Unlock</maml:name><maml:description><maml:para>Switch to unlock an account. This can be used in conjunction with the -SecurePassword or -Force parameters. The default is false.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $SecurePassword = (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> PS C:\> $cred = New-Object System.Management.Automation.PSCredential ("username", $SecurePassword) PS C:\> Set-DbaLogin -SqlInstance sql1 -Login login1 -SecurePassword $cred -Unlock -PasswordMustChange Set the new password for login1 using a credential, unlock the account and set the option that the user must change password at next logon. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -Enable </dev:code><dev:remarks><maml:para> Enable the login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1, login2, login3, login4 -Enable </dev:code><dev:remarks><maml:para> Enable multiple logins </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1, sql2, sql3 -Login login1, login2, login3, login4 -Enable </dev:code><dev:remarks><maml:para> Enable multiple logins on multiple instances </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -Disable </dev:code><dev:remarks><maml:para> Disable the login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -DenyLogin </dev:code><dev:remarks><maml:para> Deny the login to connect to the instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -GrantLogin </dev:code><dev:remarks><maml:para> Grant the login to connect to the instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -PasswordPolicyEnforced </dev:code><dev:remarks><maml:para> Enforces the password policy on a login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -PasswordPolicyEnforced:$false </dev:code><dev:remarks><maml:para> Disables enforcement of the password policy on a login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login test -AddRole serveradmin </dev:code><dev:remarks><maml:para> Add the server role "serveradmin" to the login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login test -RemoveRole bulkadmin </dev:code><dev:remarks><maml:para> Remove the server role "bulkadmin" to the login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $login = Get-DbaLogin -SqlInstance sql1 -Login test </dev:code><dev:remarks><maml:para> PS C:\> $login | Set-DbaLogin -Disable Disable the login from the pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 13 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -DefaultDatabase master </dev:code><dev:remarks><maml:para> Set the default database to master on a login </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaLogin -SqlInstance sql1 -Login login1 -Unlock -Force </dev:code><dev:remarks><maml:para> Unlocks the login1 on the sql1 instance using the technique described at https://www.mssqltips.com/sqlservertip/2758/how-to-unlock-a-sql-login-without-resetting-the-password/ </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaMaxDop</command:name><command:noun>DbaMaxDop</command:noun><command:verb>Set</command:verb><maml:description><maml:para>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.</maml:para></maml:description></command:details><maml:description><maml:para>Uses the Test-DbaMaxDop command to get the recommended value if -MaxDop parameter is not specified.</maml:para><maml:para>These are just general recommendations for SQL Server and are a good starting point for setting the "max degree of parallelism" option.</maml:para><maml:para>You can set MaxDop database scoped configurations if the server is version 2016 or higher</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaMaxDop</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more databases to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxDop</maml:name><maml:description><maml:para>Specifies the Max DOP value to set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>If Test-SqlMaxDop has been executed prior to this function, the results may be passed in via this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, Max DOP will be set on all databases. This switch is only useful on SQL Server 2016 and higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllDatabases</maml:name><maml:description><maml:para>If this switch is enabled, Max DOP will be set on all databases. This switch is only useful on SQL Server 2016 and higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies one or more databases to exclude from processing. Options for this list are auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>If Test-SqlMaxDop has been executed prior to this function, the results may be passed in via this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Psobject</command:parameterValue><dev:type><maml:name>Psobject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxDop</maml:name><maml:description><maml:para>Specifies the Max DOP value to set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: MaxDop, Utility Author: Claudio Silva (@claudioessilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxDop -SqlInstance sql2008, sql2012 </dev:code><dev:remarks><maml:para> Sets Max DOP to the recommended value for servers sql2008 and sql2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxDop -SqlInstance sql2014 -MaxDop 4 </dev:code><dev:remarks><maml:para> Sets Max DOP to 4 for server sql2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMaxDop -SqlInstance sql2008 | Set-DbaMaxDop </dev:code><dev:remarks><maml:para> Gets the recommended Max DOP from Test-DbaMaxDop and applies it to to sql2008. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxDop -SqlInstance sql2016 -Database db1 </dev:code><dev:remarks><maml:para> Set recommended Max DOP for database db1 on server sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxDop -SqlInstance sql2016 -AllDatabases </dev:code><dev:remarks><maml:para> Set recommended Max DOP for all databases on server sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaMaxDop</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaMaxMemory</command:name><command:noun>DbaMaxMemory</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets SQL Server 'Max Server Memory' configuration setting to a new value then displays information this setting.</maml:para></maml:description></command:details><maml:description><maml:para>Sets SQL Server max memory then displays information relating to SQL Server Max Memory configuration settings.</maml:para><maml:para>Inspired by Jonathan Kehayias's post about SQL Server Max memory (http://bit.ly/sqlmemcalc), this uses a formula to</maml:para><maml:para>determine the default optimum RAM to use, then sets the SQL max value to that number.</maml:para><maml:para>Jonathan notes that the formula used provides a *general recommendation* that doesn't account for everything that may</maml:para><maml:para>be going on in your specific environment.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaMaxMemory</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Max</maml:name><maml:description><maml:para>Specifies the max megabytes (MB)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A InputObject returned by Test-DbaMaxMemory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A InputObject returned by Test-DbaMaxMemory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Management.Automation.PSObject[]</command:parameterValue><dev:type><maml:name>System.Management.Automation.PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Max</maml:name><maml:description><maml:para>Specifies the max megabytes (MB)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: MaxMemory, Memory Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxMemory sqlserver1 </dev:code><dev:remarks><maml:para> Set max memory to the recommended on just one server named "sqlserver1" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaMaxMemory -SqlInstance sqlserver1 -Max 2048 </dev:code><dev:remarks><maml:para> Explicitly set max memory to 2048 on just one server, "sqlserver1" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver | Test-DbaMaxMemory | Where-Object { $_.MaxValue -gt $_.Total } | Set-DbaMaxMemory </dev:code><dev:remarks><maml:para> Find all servers in SQL Server Central Management Server that have Max SQL memory set to higher than the total memory of the server (think 2147483647), then pipe those to Set-DbaMaxMemory and use the default recommendation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaMaxMemory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaNetworkCertificate</command:name><command:noun>DbaNetworkCertificate</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the network certificate for SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Sets the network certificate for SQL Server instance. This setting is found in Configuration Manager.</maml:para><maml:para>This command also grants read permissions for the service account on the certificate's private key.</maml:para><maml:para>References:</maml:para><maml:para>https://www.itprotoday.com/sql-server/7-steps-ssl-encryption</maml:para><maml:para>https://azurebi.jppp.org/2016/01/23/using-lets-encrypt-certificates-for-secure-sql-server-connections/</maml:para><maml:para>https://blogs.msdn.microsoft.com/sqlserverfaq/2016/09/26/creating-and-registering-ssl-certificates/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaNetworkCertificate</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network certificate needs a service restart to take effect. This switch will force a restart of the service.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaNetworkCertificate</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The target certificate object</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Security.Cryptography.X509Certificates.X509Certificate2</command:parameterValue><dev:type><maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network certificate needs a service restart to take effect. This switch will force a restart of the service.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaNetworkCertificate</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>The thumbprint of the target certificate</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network certificate needs a service restart to take effect. This switch will force a restart of the service.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Certificate</maml:name><maml:description><maml:para>The target certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Security.Cryptography.X509Certificates.X509Certificate2</command:parameterValue><dev:type><maml:name>System.Security.Cryptography.X509Certificates.X509Certificate2</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to the computer (not sql instance) using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network certificate needs a service restart to take effect. This switch will force a restart of the service.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>The thumbprint of the target certificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> New-DbaComputerCertificate | Set-DbaNetworkCertificate -SqlInstance localhost\SQL2008R2SP2 </dev:code><dev:remarks><maml:para> Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaNetworkCertificate -SqlInstance sql1\SQL2008R2SP2 -Thumbprint 1223FB1ACBCA44D3EE9640F81B6BA14A92F3D6E2 </dev:code><dev:remarks><maml:para> Sets the network certificate for the SQL2008R2SP2 instance to the certificate with the thumbprint of 1223FB1ACBCA44D3EE9640F81B6BA14A92F3D6E2 in LocalMachine\My on sql1 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaNetworkCertificate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaNetworkConfiguration</command:name><command:noun>DbaNetworkConfiguration</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the network configuration of a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the network configuration of a SQL Server instance.</maml:para><maml:para>Parameters are available for typical tasks like enabling or disabling a protocol or switching between dynamic and static ports.</maml:para><maml:para>The object returned by Get-DbaNetworkConfiguration can be used to adjust settings of the properties</maml:para><maml:para>and then passed to this command via pipeline or -InputObject parameter.</maml:para><maml:para>A change to the network configuration with SQL Server requires a restart to take effect,</maml:para><maml:para>support for this can be done via the RestartService parameter.</maml:para><maml:para>Remote SQL WMI is used by default, with PS Remoting used as a fallback.</maml:para><maml:para>For a detailed explanation of the different properties see the documentation at:</maml:para><maml:para>https://docs.microsoft.com/en-us/sql/tools/configuration-manager/sql-server-network-configuration</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaNetworkConfiguration</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableProtocol</maml:name><maml:description><maml:para>Enables one of the following network protocols: SharedMemory, NamedPipes, TcpIp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableProtocol</maml:name><maml:description><maml:para>Disables one of the following network protocols: SharedMemory, NamedPipes, TcpIp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DynamicPortForIPAll</maml:name><maml:description><maml:para>Configures the instance to listen on a dynamic port for all IP addresses. Will enable the TCP/IP protocol if needed. Will set TcpIpProperties.ListenAll to $true if needed. Will reset the last used dynamic port if already set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StaticPortForIPAll</maml:name><maml:description><maml:para>Configures the instance to listen on one or more static ports for all IP addresses. Will enable the TCP/IP protocol if needed. Will set TcpIpProperties.ListenAll to $true if needed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>Configures the instance to listen on specific IP addresses only. Listening on all other IP addresses will be disabled. Takes an array of string with either the IP address (for listening on a dynamic port) or IP address and port seperated by ":". IPv6 addresses must be enclosed in square brackets, e.g. [2001:db8:4006:812::200e] or [2001:db8:4006:812::200e]:1433 to be able to identify the port.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network configuration needs a service restart to take effect. This switch will force a restart of the service if the network configuration has changed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaNetworkConfiguration</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network configuration needs a service restart to take effect. This switch will force a restart of the service if the network configuration has changed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The output object from Get-DbaNetworkConfiguration. Get-DbaNetworkConfiguration has to be run with -OutputType Full (default) to get the complete object.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableProtocol</maml:name><maml:description><maml:para>Disables one of the following network protocols: SharedMemory, NamedPipes, TcpIp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DynamicPortForIPAll</maml:name><maml:description><maml:para>Configures the instance to listen on a dynamic port for all IP addresses. Will enable the TCP/IP protocol if needed. Will set TcpIpProperties.ListenAll to $true if needed. Will reset the last used dynamic port if already set.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableProtocol</maml:name><maml:description><maml:para>Enables one of the following network protocols: SharedMemory, NamedPipes, TcpIp.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The output object from Get-DbaNetworkConfiguration. Get-DbaNetworkConfiguration has to be run with -OutputType Full (default) to get the complete object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>Configures the instance to listen on specific IP addresses only. Listening on all other IP addresses will be disabled. Takes an array of string with either the IP address (for listening on a dynamic port) or IP address and port seperated by ":". IPv6 addresses must be enclosed in square brackets, e.g. [2001:db8:4006:812::200e] or [2001:db8:4006:812::200e]:1433 to be able to identify the port.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RestartService</maml:name><maml:description><maml:para>Every change to the network configuration needs a service restart to take effect. This switch will force a restart of the service if the network configuration has changed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StaticPortForIPAll</maml:name><maml:description><maml:para>Configures the instance to listen on one or more static ports for all IP addresses. Will enable the TCP/IP protocol if needed. Will set TcpIpProperties.ListenAll to $true if needed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, SQLWMI Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaNetworkConfiguration -SqlInstance sql2016 -EnableProtocol SharedMemory -RestartService </dev:code><dev:remarks><maml:para> Ensures that the shared memory network protocol for the default instance on sql2016 is enabled. Restarts the service if needed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaNetworkConfiguration -SqlInstance sql2016\test -StaticPortForIPAll 14331, 14332 -RestartService </dev:code><dev:remarks><maml:para> Ensures that the TCP/IP network protocol is enabled and configured to use the ports 14331 and 14332 for all IP addresses. Restarts the service if needed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $netConf = Get-DbaNetworkConfiguration -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> PS C:\> $netConf.TcpIpProperties.KeepAlive = 60000 PS C:\> $netConf | Set-DbaNetworkConfiguration -RestartService -Confirm:$false Changes the value of the KeepAlive property for the default instance on sqlserver2014a and restarts the service. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaNetworkConfiguration -SqlInstance sql2016\test -IpAddress 192.168.3.41:1433 -RestartService </dev:code><dev:remarks><maml:para> Ensures that the TCP/IP network protocol is enabled and configured to only listen on port 1433 of IP address 192.168.3.41. Restarts the service if needed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaNetworkConfiguration</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaPowerPlan</command:name><command:noun>DbaPowerPlan</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the SQL Server OS's Power Plan.</maml:para></maml:description></command:details><maml:description><maml:para>Sets the SQL Server OS's Power Plan. Defaults to High Performance which is best practice.</maml:para><maml:para>If your organization uses a different power plan that is considered best practice, specify -PowerPlan.</maml:para><maml:para>References:</maml:para><maml:para>https://support.microsoft.com/en-us/kb/2207548</maml:para><maml:para>http://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaPowerPlan</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to set the Power Plan on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>PowerPlan</maml:name><maml:description><maml:para>If your organization uses a different Power Plan that's considered best practice, specify it here. Use Get-DbaPowerPlan -List to get all available Power Plans on a computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to set the Power Plan on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PowerPlan</maml:name><maml:description><maml:para>If your organization uses a different Power Plan that's considered best practice, specify it here. Use Get-DbaPowerPlan -List to get all available Power Plans on a computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PowerPlan, OS, Configure, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: WMI access to servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaPowerPlan -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Sets the Power Plan to High Performance. Skips it if its already set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'Server1', 'Server2' | Set-DbaPowerPlan -PowerPlan Balanced </dev:code><dev:remarks><maml:para> Sets the Power Plan to Balanced for Server1 and Server2. Skips it if its already set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential 'Domain\User' </dev:code><dev:remarks><maml:para> PS C:\> Set-DbaPowerPlan -ComputerName sql2017 -Credential $cred Connects using alternative Windows credential and sets the Power Plan to High Performance. Skips it if its already set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaPowerPlan -ComputerName sqlcluster -PowerPlan 'Maximum Performance' </dev:code><dev:remarks><maml:para> Sets the Power Plan to "Maximum Performance". Skips it if its already set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPowerPlan -ComputerName oldserver | Set-DbaPowerPlan -ComputerName newserver1, newserver2 </dev:code><dev:remarks><maml:para> Uses the Power Plan of oldserver as best practice and sets the Power Plan of newserver1 and newserver2 accordingly. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaPowerPlan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaPrivilege</command:name><command:noun>DbaPrivilege</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Adds the SQL Service account to local privileges on one or more computers.</maml:para></maml:description></command:details><maml:description><maml:para>Adds the SQL Service account to local privileges 'Lock Pages in Memory', 'Instant File Initialization', 'Logon as Batch', 'Logon as a service' on one or more computers.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaPrivilege</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use this to choose the privilege(s) to which you want to add the SQL Service account. Accepts 'IFI', 'LPIM', 'BatchLogon','SecAudit' and/or 'ServiceLogon' for local privileges 'Instant File Initialization', 'Lock Pages in Memory', 'Logon as Batch','Generate Security Audits' and 'Logon as a service'.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>If provided, will add requested permissions to this account instead of the the account under which the SQL service is running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use this to choose the privilege(s) to which you want to add the SQL Service account. Accepts 'IFI', 'LPIM', 'BatchLogon','SecAudit' and/or 'ServiceLogon' for local privileges 'Instant File Initialization', 'Lock Pages in Memory', 'Logon as Batch','Generate Security Audits' and 'Logon as a service'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>User</maml:name><maml:description><maml:para>If provided, will add requested permissions to this account instead of the the account under which the SQL service is running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Privilege, Security Author: Klaas Vandenberghe (@PowerDbaKlaas) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaPrivilege -ComputerName sqlserver2014a -Type LPIM,IFI </dev:code><dev:remarks><maml:para> Adds the SQL Service account(s) on computer sqlserver2014a to the local privileges 'SeManageVolumePrivilege' and 'SeLockMemoryPrivilege'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3' | Set-DbaPrivilege -Type IFI </dev:code><dev:remarks><maml:para> Adds the SQL Service account(s) on computers sql1, sql2 and sql3 to the local privilege 'SeManageVolumePrivilege'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaPrivilege</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaResourceGovernor</command:name><command:noun>DbaResourceGovernor</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the Resource Governor feature on the specified SQL Server to be enabled or disabled, along with specifying an optional classifier function.</maml:para></maml:description></command:details><maml:description><maml:para>In order to utilize Resource Governor, it has to be enabled for an instance and</maml:para><maml:para>have a classifier function specified. This function toggles the enabled status</maml:para><maml:para>and sets the classifier function.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaResourceGovernor</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enables the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disables the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClassifierFunction</maml:name><maml:description><maml:para>Sets the classifier function for Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ClassifierFunction</maml:name><maml:description><maml:para>Sets the classifier function for Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Disabled</maml:name><maml:description><maml:para>Disables the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Enabled</maml:name><maml:description><maml:para>Enables the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaResourceGovernor -SqlInstance sql2016 -Enabled </dev:code><dev:remarks><maml:para> Sets Resource Governor to enabled for the instance sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaResourceGovernor -SqlInstance sql2012\dev1 -Disabled </dev:code><dev:remarks><maml:para> Sets Resource Governor to disabled for the instance dev1 on sq2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaResourceGovernor -SqlInstance sql2012\dev1 -ClassifierFunction 'fnRGClassifier' -Enabled </dev:code><dev:remarks><maml:para> Sets Resource Governor to enabled for the instance dev1 on sq2012 and sets the classifier function to be 'fnRGClassifier'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaResourceGovernor -SqlInstance sql2012\dev1 -ClassifierFunction 'NULL' -Enabled </dev:code><dev:remarks><maml:para> Sets Resource Governor to enabled for the instance dev1 on sq2012 and sets the classifier function to be NULL. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaResourceGovernor</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaRgResourcePool</command:name><command:noun>DbaRgResourcePool</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets a resource pool for use by the Resource Governor on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Sets a resource pool for use by the Resource Governor on the specified SQL Server.</maml:para><maml:para>A resource pool represents a subset of the physical resources (memory, CPUs and IO) of an instance of the Database Engine.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaRgResourcePool</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaRgResourcePool</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbaRgResourcePool</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumProcesses</maml:name><maml:description><maml:para>Specifies the maximum number of processes allowed for the external resource pool. Specify 0 to set an unlimited threshold for the pool, which is thereafter bound only by computer resources.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CapCpuPercentage</maml:name><maml:description><maml:para>Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgResourcePool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumCpuPercentage</maml:name><maml:description><maml:para>Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumProcesses</maml:name><maml:description><maml:para>Specifies the maximum number of processes allowed for the external resource pool. Specify 0 to set an unlimited threshold for the pool, which is thereafter bound only by computer resources.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumCpuPercentage</maml:name><maml:description><maml:para>Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumIOPSPerVolume</maml:name><maml:description><maml:para>Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumMemoryPercentage</maml:name><maml:description><maml:para>Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to be created.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for resource pool changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Internal or External.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourcePool, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaRgResourcePool-SqlInstance sql2016 -ResourcePool "poolAdmin" -MaximumCpuPercentage 5 </dev:code><dev:remarks><maml:para> Configures a resource pool named "poolAdmin" for the instance sql2016 with a Maximum CPU Percent of 5. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaRgResourcePool-SqlInstance sql2012\dev1 -ResourcePool "poolDeveloper" -SkipReconfigure </dev:code><dev:remarks><maml:para> Configures a resource pool named "poolDeveloper" for the instance dev1 on sq2012. Reconfiguration is skipped and the Resource Governor will not be able to use the new resource pool until it is reconfigured. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgResourcePool -SqlInstance sql2016 -Type "Internal" | Where-Object { $_.IsSystemObject -eq $false } | Set-DbaRgResourcePool -MinMemoryPercent 10 </dev:code><dev:remarks><maml:para> Configures all user internal resource pools to have a minimum memory percent of 10 for the instance sql2016 by piping output from Get-DbaRgResourcePool. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaRgResourcePool</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaRgWorkloadGroup</command:name><command:noun>DbaRgWorkloadGroup</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets a workload group for use by the Resource Governor on the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Sets a workload group for use by the Resource Governor on the specified SQL Server.</maml:para><maml:para>A workload group represents a subset of resources of an instance of the Database Engine.</maml:para><maml:para>When changing a plan affecting setting, the new setting will only take effect in previously cached plans after executing 'DBCC FREEPROCCACHE (pool_name);'.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaRgWorkloadGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be configured.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to create the workload group in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Importance</maml:name><maml:description><maml:para>Specifies the relative importance of a request in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumMemoryGrantPercentage</maml:name><maml:description><maml:para>Specifies the maximum amount of memory that a single request can take from the pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumCpuTimeInSeconds</maml:name><maml:description><maml:para>Specifies the maximum amount of CPU time, in seconds, that a request can use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMemoryGrantTimeoutInSeconds</maml:name><maml:description><maml:para>Specifies the maximum time, in seconds, that a query can wait for a memory grant (work buffer memory) to become available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GroupMaximumRequests</maml:name><maml:description><maml:para>Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgWorkloadGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>GroupMaximumRequests</maml:name><maml:description><maml:para>Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Importance</maml:name><maml:description><maml:para>Specifies the relative importance of a request in the workload group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows input to be piped from Get-DbaRgWorkloadGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.WorkloadGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaximumDegreeOfParallelism</maml:name><maml:description><maml:para>Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumCpuTimeInSeconds</maml:name><maml:description><maml:para>Specifies the maximum amount of CPU time, in seconds, that a request can use.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMaximumMemoryGrantPercentage</maml:name><maml:description><maml:para>Specifies the maximum amount of memory that a single request can take from the pool.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RequestMemoryGrantTimeoutInSeconds</maml:name><maml:description><maml:para>Specifies the maximum time, in seconds, that a query can wait for a memory grant (work buffer memory) to become available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePool</maml:name><maml:description><maml:para>Name of the resource pool to create the workload group in.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResourcePoolType</maml:name><maml:description><maml:para>Internal or External</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipReconfigure</maml:name><maml:description><maml:para>Resource Governor requires a reconfiguriation for workload group changes to take effect. Use this switch to skip issuing a reconfigure for the Resource Governor.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server as a different user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WorkloadGroup</maml:name><maml:description><maml:para>Name of the workload group to be configured.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ResourcePool, ResourceGovernor Author: John McCall (@lowlydba), lowlydba.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaRgWorkloadGroup -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -ResourcePool "poolAdmin" </dev:code><dev:remarks><maml:para> Configures a workload group named "groupAdmin" in the resource pool "poolAdmin" for the instance sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRgWorkloadGroup | Where-Object Name -eq "groupSuperUsers" | Set-DbaRgWorkloadGroup -GroupMaximumRequests 2 </dev:code><dev:remarks><maml:para> Configures a workload group named "groupSuperUsers" by setting the maximum number of group requests to 2 for the instance sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaRgWorkloadGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaSpConfigure</command:name><command:noun>DbaSpConfigure</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Changes the server level system configuration (sys.configuration/sp_configure) value for a given configuration</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>This is designed to be safe and will not allow for configurations to be set outside of the defined configuration min and max values.</maml:para><maml:para>While 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaSpConfigure</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The new value for the configuration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the configuration to be set -- Configs is auto-populated for tabbing convenience.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped objects from Get-DbaSpConfigure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Piped objects from Get-DbaSpConfigure</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the configuration to be set -- Configs is auto-populated for tabbing convenience.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Value</maml:name><maml:description><maml:para>The new value for the configuration</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SpConfigure Author: Nic Cain, sirsql.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpConfigure -SqlInstance localhost -Name ScanForStartupProcedures -Value 1 </dev:code><dev:remarks><maml:para> Adjusts the Scan for startup stored procedures configuration value to 1 and notifies the user that this requires a SQL restart to take effect </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaSpConfigure -SqlInstance sql2017, sql2014 -Name XPCmdShellEnabled, IsSqlClrEnabled | Set-DbaSpConfigure -Value $false </dev:code><dev:remarks><maml:para> Sets the values for XPCmdShellEnabled and IsSqlClrEnabled on sql2017 and sql2014 to False </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpConfigure -SqlInstance localhost -Name XPCmdShellEnabled -Value 1 </dev:code><dev:remarks><maml:para> Adjusts the xp_cmdshell configuration value to 1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpConfigure -SqlInstance localhost -Name XPCmdShellEnabled -Value 1 -WhatIf </dev:code><dev:remarks><maml:para> Returns information on the action that would be performed. No actual change will be made. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaSpConfigure</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaSpn</command:name><command:noun>DbaSpn</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets an SPN for a given service account in active directory (and also enables delegation to the same SPN by default)</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Note: This function supports -WhatIf</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaSpn</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SPN</maml:name><maml:description><maml:para>The SPN you want to add</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>ServiceAccount</maml:name><maml:description><maml:para>The account you want the SPN added to</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to Active Directory to make the changes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDelegation</maml:name><maml:description><maml:para>Skips setting the delegation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to Active Directory to make the changes</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDelegation</maml:name><maml:description><maml:para>Skips setting the delegation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceAccount</maml:name><maml:description><maml:para>The account you want the SPN added to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SPN</maml:name><maml:description><maml:para>The SPN you want to add</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN Author: Drew Furgiuele (@pittfurg), port1433.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpn -SPN MSSQLSvc/SQLSERVERA.domain.something -ServiceAccount domain\account </dev:code><dev:remarks><maml:para> PS C:\> Set-DbaSpn -SPN MSSQLSvc/SQLSERVERA.domain.something -ServiceAccount domain\account -EnableException Connects to Active Directory and adds a provided SPN to the given account. Connects to Active Directory and adds a provided SPN to the given account, suppressing all error messages and throw exceptions that can be caught instead </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpn -SPN MSSQLSvc/SQLSERVERA.domain.something -ServiceAccount domain\account -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Connects to Active Directory and adds a provided SPN to the given account. Uses alternative account to connect to AD. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaSpn -SPN MSSQLSvc/SQLSERVERA.domain.something -ServiceAccount domain\account -NoDelegation </dev:code><dev:remarks><maml:para> Connects to Active Directory and adds a provided SPN to the given account, without the delegation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName sql2016 | Where-Object { $_.isSet -eq $false } | Set-DbaSpn </dev:code><dev:remarks><maml:para> Sets all missing SPNs for sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName sql2016 | Where-Object { $_.isSet -eq $false } | Set-DbaSpn -WhatIf </dev:code><dev:remarks><maml:para> Displays what would happen trying to set all missing SPNs for sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaSpn</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaStartupParameter</command:name><command:noun>DbaStartupParameter</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets the Startup Parameters for a SQL Server instance</maml:para></maml:description></command:details><maml:description><maml:para>Modifies the startup parameters for a specified SQL Server Instance</maml:para><maml:para>For 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</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaStartupParameter</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance to be modified If the Sql Instance is offline path parameters will be ignored as we cannot test the instance's access to the path. If you want to force this to work then please use the Force switch</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterData</maml:name><maml:description><maml:para>Path to the data file for the Master database Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterLog</maml:name><maml:description><maml:para>Path to the log file for the Master database Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorLog</maml:name><maml:description><maml:para>Path to the SQL Server error log file Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>A comma separated list of TraceFlags to be applied at SQL Server startup By default these will be appended to any existing trace flags set</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandPromptStart</maml:name><maml:description><maml:para>Shortens startup time when starting SQL Server from the command prompt. Typically, the SQL Server Database Engine starts as a service by calling the Service Control Manager. Because the SQL Server Database Engine does not start as a service when starting from the command prompt</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimalStart</maml:name><maml:description><maml:para>Starts an instance of SQL Server with minimal configuration. This is useful if the setting of a configuration value (for example, over-committing memory) has prevented the server from starting. Starting SQL Server in minimal configuration mode places SQL Server in single-user mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MemoryToReserve</maml:name><maml:description><maml:para>Specifies an integer number of megabytes (MB) of memory that SQL Server will leave available for memory allocations within the SQL Server process, but outside the SQL Server memory pool. The memory outside of the memory pool is the area used by SQL Server for loading items such as extended procedure .dll files, the OLE DB providers referenced by distributed queries, and automation objects referenced in Transact-SQL statements. The default is 256 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Start Sql Server in single user mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUserDetails</maml:name><maml:description><maml:para>The username for single user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLoggingToWinEvents</maml:name><maml:description><maml:para>Don't use Windows Application events log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAsNamedInstance</maml:name><maml:description><maml:para>Allows you to start a named instance of SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableMonitoring</maml:name><maml:description><maml:para>Disables the following monitoring features: SQL Server performance monitor counters Keeping CPU time and cache-hit ratio statistics Collecting information for the DBCC SQLPERF command Collecting information for some dynamic management views Many extended-events event points ** Warning *\* When you use the -x startup option, the information that is available for you to diagnose performance and functional problems with SQL Server is greatly reduced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncreasedExtents</maml:name><maml:description><maml:para>Increases the number of extents that are allocated for each file in a file group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlagOverride</maml:name><maml:description><maml:para>Overrides the default behaviour and replaces any existing trace flags. If not trace flags specified will just remove existing ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupConfig</maml:name><maml:description><maml:para>Pass in a previously saved SQL Instance startup config using this parameter will set TraceFlagOverride to true, so existing Trace Flags will be overridden</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Setting this switch will try perform the requested actions without connect to the SQL Server Instance, this will speed things up if you know the Instance is offline. When working offline, path inputs (MasterData, MasterLog and ErrorLog) will be ignored, unless Force is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default we test the values passed in via MasterData, MasterLog, ErrorLog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CommandPromptStart</maml:name><maml:description><maml:para>Shortens startup time when starting SQL Server from the command prompt. Typically, the SQL Server Database Engine starts as a service by calling the Service Control Manager. Because the SQL Server Database Engine does not start as a service when starting from the command prompt</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableMonitoring</maml:name><maml:description><maml:para>Disables the following monitoring features: SQL Server performance monitor counters Keeping CPU time and cache-hit ratio statistics Collecting information for the DBCC SQLPERF command Collecting information for some dynamic management views Many extended-events event points ** Warning *\* When you use the -x startup option, the information that is available for you to diagnose performance and functional problems with SQL Server is greatly reduced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ErrorLog</maml:name><maml:description><maml:para>Path to the SQL Server error log file Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>By default we test the values passed in via MasterData, MasterLog, ErrorLog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncreasedExtents</maml:name><maml:description><maml:para>Increases the number of extents that are allocated for each file in a file group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterData</maml:name><maml:description><maml:para>Path to the data file for the Master database Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterLog</maml:name><maml:description><maml:para>Path to the log file for the Master database Will be ignored if SqlInstance is offline or the Offline switch is set. To override this behaviour use the Force switch. This is to ensure you understand the risk as we cannot validate the path if the instance is offline</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MemoryToReserve</maml:name><maml:description><maml:para>Specifies an integer number of megabytes (MB) of memory that SQL Server will leave available for memory allocations within the SQL Server process, but outside the SQL Server memory pool. The memory outside of the memory pool is the area used by SQL Server for loading items such as extended procedure .dll files, the OLE DB providers referenced by distributed queries, and automation objects referenced in Transact-SQL statements. The default is 256 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimalStart</maml:name><maml:description><maml:para>Starts an instance of SQL Server with minimal configuration. This is useful if the setting of a configuration value (for example, over-committing memory) has prevented the server from starting. Starting SQL Server in minimal configuration mode places SQL Server in single-user mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoLoggingToWinEvents</maml:name><maml:description><maml:para>Don't use Windows Application events log</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Offline</maml:name><maml:description><maml:para>Setting this switch will try perform the requested actions without connect to the SQL Server Instance, this will speed things up if you know the Instance is offline. When working offline, path inputs (MasterData, MasterLog and ErrorLog) will be ignored, unless Force is specified</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUser</maml:name><maml:description><maml:para>Start Sql Server in single user mode</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SingleUserDetails</maml:name><maml:description><maml:para>The username for single user</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance to be modified If the Sql Instance is offline path parameters will be ignored as we cannot test the instance's access to the path. If you want to force this to work then please use the Force switch</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAsNamedInstance</maml:name><maml:description><maml:para>Allows you to start a named instance of SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartupConfig</maml:name><maml:description><maml:para>Pass in a previously saved SQL Instance startup config using this parameter will set TraceFlagOverride to true, so existing Trace Flags will be overridden</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlag</maml:name><maml:description><maml:para>A comma separated list of TraceFlags to be applied at SQL Server startup By default these will be appended to any existing trace flags set</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TraceFlagOverride</maml:name><maml:description><maml:para>Overrides the default behaviour and replaces any existing trace flags. If not trace flags specified will just remove existing ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Startup, Parameter, Configure Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance server1\instance1 -SingleUser </dev:code><dev:remarks><maml:para> Will configure the SQL Instance server1\instance1 to startup up in Single User mode at next startup </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents </dev:code><dev:remarks><maml:para> Will configure the SQL Instance sql2016 to IncreasedExtents = True (-E) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents:$false -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if you attempted to configure the SQL Instance sql2016 to IncreasedExtents = False (no -E) </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance server1\instance1 -TraceFlag 8032,8048 </dev:code><dev:remarks><maml:para> This will append Trace Flags 8032 and 8048 to the startup parameters </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagOverride </dev:code><dev:remarks><maml:para> This will remove all trace flags and set SingleUser to false </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance server1\instance1 -SingleUser -TraceFlag 8032,8048 -TraceFlagOverride </dev:code><dev:remarks><maml:para> This will set Trace Flags 8032 and 8048 to the startup parameters, removing any existing Trace Flags </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagOverride -Offline </dev:code><dev:remarks><maml:para> This will remove all trace flags and set SingleUser to false from an offline instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\Sql\ -Offline </dev:code><dev:remarks><maml:para> This 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: Set-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\Sql\ -Offline -Force </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $StartupConfig = Get-DbaStartupParameter -SqlInstance server1\instance1 </dev:code><dev:remarks><maml:para> PS C:\> Set-DbaStartupParameter -SqlInstance server1\instance1 -SingleUser -NoLoggingToWinEvents PS C:\> #Restart your SQL instance with the tool of choice PS C:\> #Do Some work PS C:\> Set-DbaStartupParameter -SqlInstance server1\instance1 -StartupConfig $StartupConfig PS C:\> #Restart your SQL instance with the tool of choice and you're back to normal In this example we take a copy of the existing startup configuration of server1\instance1 We then change the startup parameters ahead of some work After the work has been completed, we can push the original startup parameters back to server1\instance1 and resume normal operation </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaStartupParameter</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaTcpPort</command:name><command:noun>DbaTcpPort</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Changes the TCP port used by the specified SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>This function changes the TCP port used by the specified SQL Server.</maml:para><maml:para>Be aware that the Database Engine begins listening on a new port only when restarted. So you have to restart the Database Engine that the new settings become effective.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaTcpPort</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server itself as a different user (like SQL Configuration Manager).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>TCPPort that SQLService should listen on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>Ip address to which the change should apply, if omitted AllIp (0.0.0.0) will be changed with the new port number.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Windows server itself as a different user (like SQL Configuration Manager).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Will restart SQL Server and SQL Server Agent service to apply the change.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IpAddress</maml:name><maml:description><maml:para>Ip address to which the change should apply, if omitted AllIp (0.0.0.0) will be changed with the new port number.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Net.IPAddress[]</command:parameterValue><dev:type><maml:name>System.Net.IPAddress[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Port</maml:name><maml:description><maml:para>TCPPort that SQLService should listen on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Network, Connection, TCP, Configure Author: @H0s0n77 Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTcpPort -SqlInstance sql2017 -Port 1433 </dev:code><dev:remarks><maml:para> Sets the port number 1433 for all IP Addresses on the default instance on sql2017. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTcpPort -SqlInstance winserver\sqlexpress -IpAddress 192.168.1.22 -Port 1433 -Confirm:$false </dev:code><dev:remarks><maml:para> Sets the port number 1433 for IP 192.168.1.22 on the sqlexpress instance on winserver. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTcpPort -SqlInstance sql2017, sql2019 -port 1337 -Credential ad\dba -Force </dev:code><dev:remarks><maml:para> Sets the port number 1337 for all IP Addresses on SqlInstance sql2017 and sql2019 using the credentials for ad\dba. Prompts for confirmation. Restarts the service. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaTcpPort</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbaTempDbConfig</command:name><command:noun>DbaTempDbConfig</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Sets tempdb data and log files according to best practices.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Other 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbaTempDbConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileCount</maml:name><maml:description><maml:para>Specifies the number of data files to create. If this number is not specified, the number of logical cores of the host will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileSize</maml:name><maml:description><maml:para>Specifies the total data file size in megabytes. This is distributed across the total number of data files.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileSize</maml:name><maml:description><maml:para>Specifies the log file size in megabytes. If not specified, no change will be made.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileGrowth</maml:name><maml:description><maml:para>Specifies the growth amount for the data file(s) in megabytes. The default is 512 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileGrowth</maml:name><maml:description><maml:para>Specifies the growth amount for the log file in megabytes. The default is 512 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataPath</maml:name><maml:description><maml:para>Specifies the filesystem path(s) in which to create the tempdb data files. If not specified, current tempdb location will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogPath</maml:name><maml:description><maml:para>Specifies the filesystem path in which to create the tempdb log file. If not specified, current tempdb location will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutFile</maml:name><maml:description><maml:para>Specifies the filesystem path into which the generated T-SQL script will be saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled, only the T-SQL script to change the tempdb configuration is created and output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableGrowth</maml:name><maml:description><maml:para>If this switch is enabled, the tempdb files will be configured to not grow. This overrides -DataFileGrowth and -LogFileGrowth.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileCount</maml:name><maml:description><maml:para>Specifies the number of data files to create. If this number is not specified, the number of logical cores of the host will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileGrowth</maml:name><maml:description><maml:para>Specifies the growth amount for the data file(s) in megabytes. The default is 512 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataFileSize</maml:name><maml:description><maml:para>Specifies the total data file size in megabytes. This is distributed across the total number of data files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataPath</maml:name><maml:description><maml:para>Specifies the filesystem path(s) in which to create the tempdb data files. If not specified, current tempdb location will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableGrowth</maml:name><maml:description><maml:para>If this switch is enabled, the tempdb files will be configured to not grow. This overrides -DataFileGrowth and -LogFileGrowth.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileGrowth</maml:name><maml:description><maml:para>Specifies the growth amount for the log file in megabytes. The default is 512 MB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogFileSize</maml:name><maml:description><maml:para>Specifies the log file size in megabytes. If not specified, no change will be made.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogPath</maml:name><maml:description><maml:para>Specifies the filesystem path in which to create the tempdb log file. If not specified, current tempdb location will be used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutFile</maml:name><maml:description><maml:para>Specifies the filesystem path into which the generated T-SQL script will be saved.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled, only the T-SQL script to change the tempdb configuration is created and output.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Tempdb, Configuration Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTempDbConfig -SqlInstance localhost -DataFileSize 1000 </dev:code><dev:remarks><maml:para> Creates 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTempDbConfig -SqlInstance localhost -DataFileSize 1000 -DataFileCount 8 </dev:code><dev:remarks><maml:para> Creates tempdb with 8 data files, each one sized at 125MB, with a log file of 250MB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTempDbConfig -SqlInstance localhost -DataFileSize 1000 -OutputScriptOnly </dev:code><dev:remarks><maml:para> Provides a SQL script output to configure tempdb according to the passed parameters. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTempDbConfig -SqlInstance localhost -DataFileSize 1000 -DisableGrowth </dev:code><dev:remarks><maml:para> Disables the growth for the data and log files. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbaTempDbConfig -SqlInstance localhost -DataFileSize 1000 -OutputScriptOnly </dev:code><dev:remarks><maml:para> Returns the T-SQL script representing tempdb configuration. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbaTempDbConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Set-DbatoolsPath</command:name><command:noun>DbatoolsPath</command:noun><command:verb>Set</command:verb><maml:description><maml:para>Configures or updates a path under a name.</maml:para></maml:description></command:details><maml:description><maml:para>Configures or updates a path under a name.</maml:para><maml:para>The path can be persisted using the "-Register" command.</maml:para><maml:para>Paths setup like this can be retrieved using Get-DbatoolsPath.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-DbatoolsPath</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name the path should be stored under.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path that should be returned under the name.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-DbatoolsPath</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name the path should be stored under.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path that should be returned under the name.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description><maml:para>Registering a path in order for it to persist across sessions.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>The configuration scope it should be registered under. Defaults to UserDefault. Configuration scopes are the default locations configurations are being stored at.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>Name the path should be stored under.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path that should be returned under the name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Register</maml:name><maml:description><maml:para>Registering a path in order for it to persist across sessions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>The configuration scope it should be registered under. Defaults to UserDefault. Configuration scopes are the default locations configurations are being stored at.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Set-DbatoolsPath -Name 'temp' -Path 'C:\temp' </dev:code><dev:remarks><maml:para> Configures C:\temp as the current temp path. (does not override $Env:TEMP !) </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Set-DbatoolsPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Show-DbaDbList</command:name><command:noun>DbaDbList</command:noun><command:verb>Show</command:verb><maml:description><maml:para>Shows a list of databases in a GUI.</maml:para></maml:description></command:details><maml:description><maml:para>Shows a list of databases in a GUI. Returns a string holding the name of the selected database. Hitting cancel returns null.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Show-DbaDbList</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances..</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Title</maml:name><maml:description><maml:para>Title of the window being displayed. Default is "Select Database".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Header</maml:name><maml:description><maml:para>Header text displayed above the database listing. Default is "Select the database:".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDb</maml:name><maml:description><maml:para>Specify a database to have selected when the window appears.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DefaultDb</maml:name><maml:description><maml:para>Specify a database to have selected when the window appears.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default in most of our commands, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This command, however, gifts you with "sea of red" exceptions, by default, because it is useful for advanced scripting. Using this switch turns our "nice by default" feature on which makes errors into pretty warnings.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Header</maml:name><maml:description><maml:para>Header text displayed above the database listing. Default is "Select the database:".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Title</maml:name><maml:description><maml:para>Title of the window being displayed. Default is "Select Database".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, FileSystem Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Show-DbaDbList -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Shows a GUI list of databases using Windows Authentication to connect to the SQL Server. Returns a string of the selected database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Show-DbaDbList -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Shows a GUI list of databases using SQL credentials to connect to the SQL Server. Returns a string of the selected database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Show-DbaDbList -SqlInstance sqlserver2014a -DefaultDb master </dev:code><dev:remarks><maml:para> Shows 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Show-DbaDbList</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Show-DbaInstanceFileSystem</command:name><command:noun>DbaInstanceFileSystem</command:noun><command:verb>Show</command:verb><maml:description><maml:para>Shows file system on remote SQL Server in a local GUI and returns the selected directory name</maml:para></maml:description></command:details><maml:description><maml:para>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's file structure.</maml:para><maml:para>Show-DbaInstanceFileSystem uses SQL Management Objects to browse the directories and what you see is limited to the permissions of the account running the command.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Show-DbaInstanceFileSystem</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, FileSystem, OS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Show-DbaInstanceFileSystem -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> Shows a list of databases using Windows Authentication to connect to the SQL Server. Returns a string of the selected path. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Show-DbaInstanceFileSystem -SqlInstance sql2017 -SqlCredential $cred </dev:code><dev:remarks><maml:para> Shows a list of databases using SQL credentials to connect to the SQL Server. Returns a string of the selected path. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Show-DbaInstanceFileSystem</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts a running SQL Server Agent Job.</maml:para></maml:description></command:details><maml:description><maml:para>This command starts a job then returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaAgentJob</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The step name to start the job at, will default to the step configured by the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllJobs</maml:name><maml:description><maml:para>Retrieve all the jobs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parallel</maml:name><maml:description><maml:para>Works in conjunction with the Wait switch. Be default, when passing the Wait switch, each job is started one at a time and waits for completion before starting the next job. The Parallel switch will change the behavior to start all jobs at once, and wait for all jobs to complete .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitPeriod</maml:name><maml:description><maml:para>Wait period in seconds to use when -Wait is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SleepPeriod</maml:name><maml:description><maml:para>Period in milliseconds to wait after a job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-DbaAgentJob</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The step name to start the job at, will default to the step configured by the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllJobs</maml:name><maml:description><maml:para>Retrieve all the jobs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parallel</maml:name><maml:description><maml:para>Works in conjunction with the Wait switch. Be default, when passing the Wait switch, each job is started one at a time and waits for completion before starting the next job. The Parallel switch will change the behavior to start all jobs at once, and wait for all jobs to complete .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitPeriod</maml:name><maml:description><maml:para>Wait period in seconds to use when -Wait is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SleepPeriod</maml:name><maml:description><maml:para>Period in milliseconds to wait after a job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-DbaAgentJob</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The step name to start the job at, will default to the step configured by the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter that enables piping</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllJobs</maml:name><maml:description><maml:para>Retrieve all the jobs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parallel</maml:name><maml:description><maml:para>Works in conjunction with the Wait switch. Be default, when passing the Wait switch, each job is started one at a time and waits for completion before starting the next job. The Parallel switch will change the behavior to start all jobs at once, and wait for all jobs to complete .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitPeriod</maml:name><maml:description><maml:para>Wait period in seconds to use when -Wait is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SleepPeriod</maml:name><maml:description><maml:para>Period in milliseconds to wait after a job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllJobs</maml:name><maml:description><maml:para>Retrieve all the jobs</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter that enables piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Parallel</maml:name><maml:description><maml:para>Works in conjunction with the Wait switch. Be default, when passing the Wait switch, each job is started one at a time and waits for completion before starting the next job. The Parallel switch will change the behavior to start all jobs at once, and wait for all jobs to complete .</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SleepPeriod</maml:name><maml:description><maml:para>Period in milliseconds to wait after a job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StepName</maml:name><maml:description><maml:para>The step name to start the job at, will default to the step configured by the job.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has started</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WaitPeriod</maml:name><maml:description><maml:para>Wait period in seconds to use when -Wait is used</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Job, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance localhost </dev:code><dev:remarks><maml:para> Starts all running SQL Agent Jobs on the local SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture | Start-DbaAgentJob </dev:code><dev:remarks><maml:para> Starts the cdc.DBWithCDC_capture SQL Agent Job on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture </dev:code><dev:remarks><maml:para> Starts the cdc.DBWithCDC_capture SQL Agent Job on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Find-DbaAgentJob -IsFailed | Start-DbaAgentJob </dev:code><dev:remarks><maml:para> Restarts all failed jobs on all servers in the $servers collection </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance sql2016 -AllJobs </dev:code><dev:remarks><maml:para> Start all the jobs </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance sql2016 -Job @('Job1', 'Job2', 'Job3') -Wait </dev:code><dev:remarks><maml:para> This is a serialized approach to submitting jobs and waiting for each job to continue the next. Starts Job1, waits for completion of Job1 Starts Job2, waits for completion of Job2 Starts Job3, Waits for completion of Job3 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance sql2016 -Job @('Job1', 'Job2', 'Job3') -Wait -Parallel </dev:code><dev:remarks><maml:para> This is a parallel approach to submitting all jobs and waiting for them all to complete. Starts Job1, starts Job2, starts Job3 and waits for completion of Job1, Job2, and Job3. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaAgentJob -SqlInstance sql2016 -Job JobWith5Steps -StepName Step4 </dev:code><dev:remarks><maml:para> Starts the JobWith5Steps SQL Agent Job at step Step4. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaDbEncryption</command:name><command:noun>DbaDbEncryption</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Combo command that encrypts all instances on a database and backs up all keys and certs</maml:para></maml:description></command:details><maml:description><maml:para>Combo command that encrypts all instances on a database and backs up all keys and certs</maml:para><maml:para>* Ensures a database master key exists in the master database and backs it up</maml:para><maml:para>* Ensures a database certificate or asymmetric key exists in the master database and backs it up</maml:para><maml:para>* Creates a database encryption key in the target database and backs it up</maml:para><maml:para>* Enables database encryption on the target database and backs it up</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaDbEncryption</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the encryptor (Certificate or Asymmetric Key) in master that will be used. Tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorType</maml:name><maml:description><maml:para>Type of Encryptor - either Asymmetric or Certificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases that will be encrypted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPath</maml:name><maml:description><maml:para>The path (accessible by and relative to the SQL Server) where master keys and certificates are backed up</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeySecurePassword</maml:name><maml:description><maml:para>A master service key will be created and backed up if one does not exist MasterKeySecurePassword is the secure string (password) used to create the key This parameter is required even if no master keys are made, as we won't know if master key creation will be required until each server is processed</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateSubject</maml:name><maml:description><maml:para>Optional subject that will be used when creating all certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateStartDate</maml:name><maml:description><maml:para>Optional start date that will be used when creating all certificates By default, certs will start immediately</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateExpirationDate</maml:name><maml:description><maml:para>Optional expiration that will be used when creating all certificates By default, certs will last 5 years</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateActiveForServiceBrokerDialog</maml:name><maml:description><maml:para>Microsoft has not provided a description so we can only assume the cert is active for service broker dialog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupSecurePassword</maml:name><maml:description><maml:para>This command will perform backups of all maskter keys and certificates. Use this parameter to set the backup password</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases This was added to emphasize that all user databases will be encrypted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllUserDatabases</maml:name><maml:description><maml:para>Run command against all user databases This was added to emphasize that all user databases will be encrypted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupPath</maml:name><maml:description><maml:para>The path (accessible by and relative to the SQL Server) where master keys and certificates are backed up</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupSecurePassword</maml:name><maml:description><maml:para>This command will perform backups of all maskter keys and certificates. Use this parameter to set the backup password</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateActiveForServiceBrokerDialog</maml:name><maml:description><maml:para>Microsoft has not provided a description so we can only assume the cert is active for service broker dialog</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateExpirationDate</maml:name><maml:description><maml:para>Optional expiration that will be used when creating all certificates By default, certs will last 5 years</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateStartDate</maml:name><maml:description><maml:para>Optional start date that will be used when creating all certificates By default, certs will start immediately</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CertificateSubject</maml:name><maml:description><maml:para>Optional subject that will be used when creating all certificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases that will be encrypted</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the encryptor (Certificate or Asymmetric Key) in master that will be used. Tries to find one if one is not specified. In order to encrypt the database encryption key with an asymmetric key, you must use an asymmetric key that resides on an extensible key management provider.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EncryptorType</maml:name><maml:description><maml:para>Type of Encryptor - either Asymmetric or Certificate</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeySecurePassword</maml:name><maml:description><maml:para>A master service key will be created and backed up if one does not exist MasterKeySecurePassword is the secure string (password) used to create the key This parameter is required even if no master keys are made, as we won't know if master key creation will be required until each server is processed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $masterkeypass = (Get-Credential justneedpassword).Password </dev:code><dev:remarks><maml:para> PS C:\> $certbackuppass = (Get-Credential justneedpassword).Password PS C:\> $params = @{ >> SqlInstance = "sql01" >> AllUserDatabases = $true >> MasterKeySecurePassword = $masterkeypass >> BackupSecurePassword = $certbackuppass >> BackupPath = "C:\temp" >> EnableException = $true >> } PS C:\> Start-DbaDbEncryption @params Prompts for two passwords (the username doesn't matter, this is just an easy & secure way to get a secure password) Then encrypts all user databases on sql01, creating master keys and certificates as needed, and backing all of them up to C:\temp, securing them with the password set in $certbackuppass </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaDbEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts endpoints on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Starts endpoints on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaEndpoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only start specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Start all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Start all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only start specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaEndpoint -SqlInstance sqlserver2012 -AllEndpoints </dev:code><dev:remarks><maml:para> Starts all endpoints on the sqlserver2014 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaEndpoint -SqlInstance sqlserver2012 -Endpoint endpoint1,endpoint2 -SqlCredential sqladmin </dev:code><dev:remarks><maml:para> Logs into sqlserver2012 using alternative credentials and starts the endpoint1 and endpoint2 endpoints. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Endpoint -SqlInstance sqlserver2012 -Endpoint endpoint1 | Start-DbaEndpoint </dev:code><dev:remarks><maml:para> Starts the endpoints returned from the Get-Endpoint function. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaMigration</command:name><command:noun>DbaMigration</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Migrates SQL Server *ALL* databases, logins, database mail profiles/accounts, credentials, SQL Agent objects, linked servers, Central Management Server objects, server configuration settings (sp_configure), user objects in systems databases, system triggers and backup devices from one SQL Server to another. For more granular control, please use Exclude or use the other functions available within the dbatools module.</maml:para></maml:description></command:details><maml:description><maml:para>Start-DbaMigration consolidates most of the migration tools in dbatools into one command. This is useful when you're looking to migrate entire instances. It less flexible than using the underlying functions. Think of it as an easy button. It migrates:</maml:para><maml:para>All user databases to exclude support databases such as ReportServerTempDB (Use -IncludeSupportDbs for this). Use -Exclude Databases to skip.</maml:para><maml:para>All logins. Use -Exclude Logins to skip.</maml:para><maml:para>All database mail objects. Use -Exclude DatabaseMail</maml:para><maml:para>All credentials. Use -Exclude Credentials to skip.</maml:para><maml:para>All objects within the Job Server (SQL Agent). Use -Exclude AgentServer to skip.</maml:para><maml:para>All linked servers. Use -Exclude LinkedServers to skip.</maml:para><maml:para>All groups and servers within Central Management Server. Use -Exclude CentralManagementServer to skip.</maml:para><maml:para>All SQL Server configuration objects (everything in sp_configure). Use -Exclude SpConfigure to skip.</maml:para><maml:para>All user objects in system databases. Use -Exclude SysDbUserObjects to skip.</maml:para><maml:para>All system triggers. Use -Exclude SystemTriggers to skip.</maml:para><maml:para>All system backup devices. Use -Exclude BackupDevices to skip.</maml:para><maml:para>All Audits. Use -Exclude Audits to skip.</maml:para><maml:para>All Endpoints. Use -Exclude Endpoints to skip.</maml:para><maml:para>All Extended Events. Use -Exclude ExtendedEvents to skip.</maml:para><maml:para>All Policy Management objects. Use -Exclude PolicyManagement to skip.</maml:para><maml:para>All Resource Governor objects. Use -Exclude ResourceGovernor to skip.</maml:para><maml:para>All Server Audit Specifications. Use -Exclude ServerAuditSpecifications to skip.</maml:para><maml:para>All Custom Errors (User Defined Messages). Use -Exclude CustomErrors to skip.</maml:para><maml:para>All Data Collector collection sets. Does not configure the server. Use -Exclude DataCollector to skip.</maml:para><maml:para>All startup procedures. Use -Exclude StartupProcedures to skip.</maml:para><maml:para>This 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.</maml:para><maml:para>By default, databases will be migrated to the destination SQL Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. Filestreams and filegroups are also migrated. Safety is emphasized.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaMigration</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You may specify multiple servers. Note that when using -BackupRestore with multiple servers, the backup will only be performed once and backups will be deleted at the end. When using -DetachAttach with multiple servers, -Reattach must be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DetachAttach</maml:name><maml:description><maml:para>If this switch is enabled, the the detach/copy/attach method is used to perform database migrations. No files are deleted on Source. If the destination attachment fails, the source database will be reattached. File copies are performed over administrative shares (\\server\x$\mssql) using BITS. If a database is being mirrored, the mirror will be broken prior to migration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Reattach</maml:name><maml:description><maml:para>If this switch is enabled, all databases are reattached to Source after a DetachAttach migration is complete.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRestore</maml:name><maml:description><maml:para>If this switch is enabled, the Copy-Only backup and restore method is used to perform database migrations. You must specify -SharedPath with a valid UNC format as well (\\server\share).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts on both Source and Destination must have read/write permission to access this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>If this switch is enabled, databases are restored from backup using WITH REPLACE. This is useful if you want to stage some complex file paths.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is enabled, databases will be left in the No Recovery state to enable further backups to be added.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceReadOnly</maml:name><maml:description><maml:para>If this switch is enabled, all migrated databases will be set to ReadOnly on the source instance prior to detach/attach & backup/restore. If -Reattach is specified, the database is set to read-only after reattaching.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, the data and log directory structures on Source will be kept on Destination. Otherwise, databases will be migrated to Destination's default data and log directories. Consider this if you're migrating between different versions and use part of Microsoft's default SQL structure (MSSQL12.INSTANCE, etc.).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSupportDbs</maml:name><maml:description><maml:para>If this switch is enabled, the ReportServer, ReportServerTempDb, SSIDb, and distribution databases will be migrated if they exist. A logfile named $SOURCE-$DESTINATION-$date-Sqls.csv will be written to the current directory. Requires -BackupRestore or -DetachAttach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to migrate Databases Logins AgentServer Credentials LinkedServers SpConfigure CentralManagementServer DatabaseMail SysDbUserObjects SystemTriggers BackupDevices Audits Endpoints ExtendedEvents PolicyManagement ResourceGovernor ServerAuditSpecifications CustomErrors DataCollector StartupProcedures AgentServerProperties MasterCertificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, migrated SQL Agent jobs will be disabled on the destination instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnSource</maml:name><maml:description><maml:para>If this switch is enabled, SQL Agent jobs will be disabled on the source instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSaRename</maml:name><maml:description><maml:para>If this switch is enabled, the sa account will not be renamed on the destination instance to match the source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full, diff and logs instead of performing backups. Note that the backups must exist in a location accessible by all destination servers, such a network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be copied as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be copied as part of the database copy operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified, will to attempt to restore transaction log backups on top of existing database(s) in Recovering or Standby states. Only usable with -UseLastBackup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If migrating users, forces drop and recreate of SQL and Windows logins. If migrating databases, deletes existing databases with matching names. If using -DetachAttach, -Force will break mirrors and drop dbs from Availability Groups. For other migration objects, it will just drop existing items and readd, if -force is supported within the underlying function.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Name of the AzureCredential if SharedPath is Azure page blob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeyPassword</maml:name><maml:description><maml:para>The password to encrypt a master key if one is required. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>Name of the AzureCredential if SharedPath is Azure page blob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupRestore</maml:name><maml:description><maml:para>If this switch is enabled, the Copy-Only backup and restore method is used to perform database migrations. You must specify -SharedPath with a valid UNC format as well (\\server\share).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>If specified, will to attempt to restore transaction log backups on top of existing database(s) in Recovering or Standby states. Only usable with -UseLastBackup</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You may specify multiple servers. Note that when using -BackupRestore with multiple servers, the backup will only be performed once and backups will be deleted at the end. When using -DetachAttach with multiple servers, -Reattach must be specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DetachAttach</maml:name><maml:description><maml:para>If this switch is enabled, the the detach/copy/attach method is used to perform database migrations. No files are deleted on Source. If the destination attachment fails, the source database will be reattached. File copies are performed over administrative shares (\\server\x$\mssql) using BITS. If a database is being mirrored, the mirror will be broken prior to migration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, migrated SQL Agent jobs will be disabled on the destination instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobsOnSource</maml:name><maml:description><maml:para>If this switch is enabled, SQL Agent jobs will be disabled on the source instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to migrate Databases Logins AgentServer Credentials LinkedServers SpConfigure CentralManagementServer DatabaseMail SysDbUserObjects SystemTriggers BackupDevices Audits Endpoints ExtendedEvents PolicyManagement ResourceGovernor ServerAuditSpecifications CustomErrors DataCollector StartupProcedures AgentServerProperties MasterCertificates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSaRename</maml:name><maml:description><maml:para>If this switch is enabled, the sa account will not be renamed on the destination instance to match the source.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If migrating users, forces drop and recreate of SQL and Windows logins. If migrating databases, deletes existing databases with matching names. If using -DetachAttach, -Force will break mirrors and drop dbs from Availability Groups. For other migration objects, it will just drop existing items and readd, if -force is supported within the underlying function.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeSupportDbs</maml:name><maml:description><maml:para>If this switch is enabled, the ReportServer, ReportServerTempDb, SSIDb, and distribution databases will be migrated if they exist. A logfile named $SOURCE-$DESTINATION-$date-Sqls.csv will be written to the current directory. Requires -BackupRestore or -DetachAttach.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepCDC</maml:name><maml:description><maml:para>Indicates whether CDC information should be copied as part of the database</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepReplication</maml:name><maml:description><maml:para>Indicates whether replication configuration should be copied as part of the database copy operation</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MasterKeyPassword</maml:name><maml:description><maml:para>The password to encrypt a master key if one is required. This must be a SecureString.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRecovery</maml:name><maml:description><maml:para>If this switch is enabled, databases will be left in the No Recovery state to enable further backups to be added.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Reattach</maml:name><maml:description><maml:para>If this switch is enabled, all databases are reattached to Source after a DetachAttach migration is complete.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>If this switch is enabled, the data and log directory structures on Source will be kept on Destination. Otherwise, databases will be migrated to Destination's default data and log directories. Consider this if you're migrating between different versions and use part of Microsoft's default SQL structure (MSSQL12.INSTANCE, etc.).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SetSourceReadOnly</maml:name><maml:description><maml:para>If this switch is enabled, all migrated databases will be set to ReadOnly on the source instance prior to detach/attach & backup/restore. If -Reattach is specified, the database is set to read-only after reattaching.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Specifies the network location for the backup files. The SQL Server service accounts on both Source and Destination must have read/write permission to access this location.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Use the last full, diff and logs instead of performing backups. Note that the backups must exist in a location accessible by all destination servers, such a network share.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>If this switch is enabled, databases are restored from backup using WITH REPLACE. This is useful if you want to stage some complex file paths.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaMigration -Source sqlserver\instance -Destination sqlcluster -DetachAttach </dev:code><dev:remarks><maml:para> All 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 be updated. User passwords, SIDs, database roles and server roles will be migrated along with the login. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> >> Source = "sqlcluster" >> Destination = "sql2016" >> SourceSqlCredential = $scred >> DestinationSqlCredential = $cred >> SharedPath = "\\fileserver\share\sqlbackups\Migration" >> BackupRestore = $true >> ReuseSourceFolderStructure = $true >> Force = $true >> } >> PS C:\> Start-DbaMigration @params -Verbose Utilizes 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, credentials, SQL Agent, Central Management Server, and SQL Server global configuration. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaMigration -Verbose -Source sqlcluster -Destination sql2016 -DetachAttach -Reattach -SetSourceReadonly </dev:code><dev:remarks><maml:para> Migrates databases using detach/copy/attach. Reattach at source and set source databases read-only. Also migrates everything else. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $PSDefaultParameters = @{ </dev:code><dev:remarks><maml:para> >> "dbatools:Source" = "sqlcluster" >> "dbatools:Destination" = "sql2016" >> } >> PS C:\> Start-DbaMigration -Verbose -Exclude Databases, Logins Utilizes 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 passing them in constantly. The execution of the function will migrate everything but logins and databases. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaMigration</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaPfDataCollectorSet</command:name><command:noun>DbaPfDataCollectorSet</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts Performance Monitor Data Collector Set.</maml:para></maml:description></command:details><maml:description><maml:para>Starts Performance Monitor Data Collector Set.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaPfDataCollectorSet</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to start.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoWait</maml:name><maml:description><maml:para>If this switch is enabled, the collector is started and the results are returned immediately.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to start.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoWait</maml:name><maml:description><maml:para>If this switch is enabled, the collector is started and the results are returned immediately.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PerfMon Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Attempts to start all ready Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaPfDataCollectorSet -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Attempts to start all ready Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Starts the 'System Correlation' Collector on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Start-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Starts the 'System Correlation' Collector. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaPfDataCollectorSet</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaService</command:name><command:noun>DbaService</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts SQL Server services on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Starts the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaService</maml:name><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-DbaService</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, SqlServer, Instance, Connect Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires Local Admin rights on destination computer(s). </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaService -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Starts the SQL Server related services on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3'| Get-DbaService | Start-DbaService </dev:code><dev:remarks><maml:para> Gets the SQL Server related services on computers sql1, sql2 and sql3 and starts them. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaService -ComputerName sql1,sql2 -Instance MSSQLSERVER </dev:code><dev:remarks><maml:para> Starts the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaService -ComputerName $MyServers -Type SSRS </dev:code><dev:remarks><maml:para> Starts the SQL Server related services of type "SSRS" (Reporting Services) on computers in the variable MyServers. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaService</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaTrace</command:name><command:noun>DbaTrace</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts SQL Server traces</maml:para></maml:description></command:details><maml:description><maml:para>Starts SQL Server traces</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaTrace</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaTrace -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> Starts all traces on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaTrace -SqlInstance sql2008 -Id 1 </dev:code><dev:remarks><maml:para> Starts all trace with ID 1 on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Start-DbaTrace </dev:code><dev:remarks><maml:para> Starts selected traces on sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaTrace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Start</command:verb><maml:description><maml:para>Starts Extended Events sessions.</maml:para></maml:description></command:details><maml:description><maml:para>This script starts Extended Events sessions on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only start specific Extended Events sessions.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be started. This is done via a self-deleting schedule. The command returns immediately and returns the affected sessions in their current state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be stopped. This is done via a self-deleting schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be started. This is done via a self-deleting schedule. The command returns immediately and returns the affected sessions in their current state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be stopped. This is done via a self-deleting schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>Start all Extended Events sessions on an instance, ignoring the packaged sessions: AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-DbaXESession</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be started. This is done via a self-deleting schedule. The command returns immediately and returns the affected sessions in their current state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be stopped. This is done via a self-deleting schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter to support piping from Get-DbaXESession</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>Start all Extended Events sessions on an instance, ignoring the packaged sessions: AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter to support piping from Get-DbaXESession</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only start specific Extended Events sessions.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be started. This is done via a self-deleting schedule. The command returns immediately and returns the affected sessions in their current state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StopAt</maml:name><maml:description><maml:para>Specifies a datetime at which the session will be stopped. This is done via a self-deleting schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Datetime</command:parameterValue><dev:type><maml:name>Datetime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Doug Meyers Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaXESession -SqlInstance sqlserver2012 -AllSessions </dev:code><dev:remarks><maml:para> Starts all Extended Event Session on the sqlserver2014 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2 </dev:code><dev:remarks><maml:para> Starts the xesession1 and xesession2 Extended Event sessions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2 -StopAt (Get-Date).AddMinutes(30) </dev:code><dev:remarks><maml:para> Starts the xesession1 and xesession2 Extended Event sessions and stops them in 30 minutes. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Start-DbaXESession -SqlInstance sqlserver2012 -Session AlwaysOn_health -StartAt (Get-Date).AddMinutes(1) </dev:code><dev:remarks><maml:para> Starts the AlwaysOn_health Extended Event sessions in 1 minute. The command will return immediately. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sqlserver2012 -Session xesession1 | Start-DbaXESession </dev:code><dev:remarks><maml:para> Starts the sessions returned from the Get-DbaXESession function. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Start-DbaXESmartTarget</command:name><command:noun>DbaXESmartTarget</command:noun><command:verb>Start</command:verb><maml:description><maml:para>XESmartTarget runs as a client application for an Extended Events session running on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>XESmartTarget offers the ability to set up complex actions in response to Extended Events captured in sessions, without writing a single line of code.</maml:para><maml:para>See more at https://github.com/spaghettidba/XESmartTarget/wiki</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-DbaXESmartTarget</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Name of the Extended Events session to attach to. You can monitor a single session with an instance of XESmartTarget. In case you need to perform action on multiple sessions, run an additional instance of XESmartTarget, with its own configuration file.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailOnProcessingError</maml:name><maml:description><maml:para>If this switch is enabled, the a processing error will trigger a failure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Responder</maml:name><maml:description><maml:para>The list of responses can include zero or more Response objects, each to be configured by specifying values for their public members.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Path to the dbatools built-in templates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotAsJob</maml:name><maml:description><maml:para>If this switch is enabled, output will be sent to screen indefinitely. BY default, a job will be run in the background.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the name of the database that contains the target table.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FailOnProcessingError</maml:name><maml:description><maml:para>If this switch is enabled, the a processing error will trigger a failure.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotAsJob</maml:name><maml:description><maml:para>If this switch is enabled, output will be sent to screen indefinitely. BY default, a job will be run in the background.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Responder</maml:name><maml:description><maml:para>The list of responses can include zero or more Response objects, each to be configured by specifying values for their public members.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Name of the Extended Events session to attach to. You can monitor a single session with an instance of XESmartTarget. In case you need to perform action on multiple sessions, run an additional instance of XESmartTarget, with its own configuration file.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Template</maml:name><maml:description><maml:para>Path to the dbatools built-in templates</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent, SmartTarget Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query "update table set whatever = 1" </dev:code><dev:remarks><maml:para> PS C:\>Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response Executes a T-SQL command against dbadb on sql2017 whenever a deadlock event is recorded. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartQueryExec -SqlInstance sql2017 -Database dbadb -Query "update table set whatever = 1" </dev:code><dev:remarks><maml:para> PS C:\>$params = @{ >> SmtpServer = "smtp.ad.local" >> To = "admin@ad.local" >> Sender = "reports@ad.local" >> Subject = "Query executed" >> Body = "Query executed at {collection_time}" >> Attachment = "batch_text" >> AttachmentFileName = "query.sql" >> } PS C:\> $emailresponse = New-DbaXESmartEmail @params PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session querytracker -Responder $response, $emailresponse Executes a T-SQL command against dbadb on sql2017 and sends an email whenever a querytracker event is recorded. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $columns = "cpu_time", "duration", "physical_reads", "logical_reads", "writes", "row_count", "batch_text" </dev:code><dev:remarks><maml:para> PS C:\> $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumns $columns -Filter "duration > 10000" PS C:\> Start-DbaXESmartTarget -SqlInstance sql2017 -Session deadlock_tracker -Responder $response Writes Extended Events to the deadlocktracker table in dbadb on sql2017. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Start-DbaXESmartTarget</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaAgentJob</command:name><command:noun>DbaAgentJob</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops a running SQL Server Agent Job.</maml:para></maml:description></command:details><maml:description><maml:para>This command stops a job then returns connected SMO object for SQL Agent Job information for each instance(s) of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaAgentJob</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has completely stopped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaAgentJob</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has completely stopped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaAgentJob</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter that enables piping</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has completely stopped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>The job(s) to exclude - this list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter that enables piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.Job[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.Job[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>The job(s) to process - this list is auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Wait</maml:name><maml:description><maml:para>Wait for output until the job has completely stopped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Job, Agent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaAgentJob -SqlInstance localhost </dev:code><dev:remarks><maml:para> Stops all running SQL Agent Jobs on the local SQL Server instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture | Stop-DbaAgentJob </dev:code><dev:remarks><maml:para> Stops the cdc.DBWithCDC_capture SQL Agent Job on sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaAgentJob -SqlInstance sql2016 -Job cdc.DBWithCDC_capture </dev:code><dev:remarks><maml:para> Stops the cdc.DBWithCDC_capture SQL Agent Job on sql2016 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaAgentJob</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaDbEncryption</command:name><command:noun>DbaDbEncryption</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Decrypts all databases on an instance</maml:para></maml:description></command:details><maml:description><maml:para>Decrypts all databases on an instance</maml:para><maml:para>Removes the encryption key but does not touch certificates or master keys</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaDbEncryption</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaDbEncryption -SqlInstance sql01 </dev:code><dev:remarks><maml:para> Removes this does that </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaDbEncryption -SqlInstance sql01 -Confirm:$false </dev:code><dev:remarks><maml:para> Removes this does that </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaDbEncryption</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops endpoints on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Stops endpoints on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaEndpoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only stop specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Stops all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllEndpoints</maml:name><maml:description><maml:para>Stops all endpoints on an instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Only stop specific endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-Endpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaEndpoint -SqlInstance sql2017a -AllEndpoints </dev:code><dev:remarks><maml:para> Stops all endpoints on the sqlserver2014 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaEndpoint -SqlInstance sql2017a -Endpoint endpoint1,endpoint2 </dev:code><dev:remarks><maml:para> Stops the endpoint1 and endpoint2 endpoints. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-Endpoint -SqlInstance sql2017a -Endpoint endpoint1 | Stop-DbaEndpoint </dev:code><dev:remarks><maml:para> Stops the endpoints returned from the Get-Endpoint command. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaExternalProcess</command:name><command:noun>DbaExternalProcess</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops an OS process created by SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Stops an OS process created by SQL Server</maml:para><maml:para>Helps when killing hung sessions with External Wait Types</maml:para><maml:para>https://web.archive.org/web/20201027122300/http://vickyharp.com/2013/12/killing-sessions-with-external-wait-types/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaExternalProcess</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server host computer</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>ProcessId</maml:name><maml:description><maml:para>The process ID of the OS process to kill</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server host computer</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ProcessId</maml:name><maml:description><maml:para>The process ID of the OS process to kill</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Process Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExternalProcess -ComputerName SQL01 | Stop-DbaExternalProcess </dev:code><dev:remarks><maml:para> Kills all OS processes created by SQL Server on SQL01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaExternalProcess -ComputerName SQL01 | Where-Object Name -eq "cmd.exe" | Stop-DbaExternalProcess </dev:code><dev:remarks><maml:para> Kills all cmd.exe processes created by SQL Server on SQL01 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaExternalProcess</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaPfDataCollectorSet</command:name><command:noun>DbaPfDataCollectorSet</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops Performance Monitor Data Collector Set.</maml:para></maml:description></command:details><maml:description><maml:para>Stops Performance Monitor Data Collector Set.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaPfDataCollectorSet</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoWait</maml:name><maml:description><maml:para>If this switch is enabled, the collector is stopped and the results are returned immediately.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CollectorSet</maml:name><maml:description><maml:para>The name of the Collector Set to stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer. Defaults to localhost.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaPfDataCollectorSet via the pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoWait</maml:name><maml:description><maml:para>If this switch is enabled, the collector is stopped and the results are returned immediately.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PerfMon Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Attempts to stop all ready Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaPfDataCollectorSet -ComputerName sql2017 </dev:code><dev:remarks><maml:para> Attempts to stop all ready Collectors on localhost. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaPfDataCollectorSet -ComputerName sql2017, sql2016 -Credential ad\sqldba -CollectorSet 'System Correlation' </dev:code><dev:remarks><maml:para> Stops the 'System Correlation' Collector on sql2017 and sql2016 using alternative credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPfDataCollectorSet -CollectorSet 'System Correlation' | Stop-DbaPfDataCollectorSet </dev:code><dev:remarks><maml:para> Stops the 'System Correlation' Collector. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaPfDataCollectorSet</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaProcess</command:name><command:noun>DbaProcess</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>This command finds and kills SQL Server processes.</maml:para></maml:description></command:details><maml:description><maml:para>This command kills all spids associated with a spid, login, host, program or database.</maml:para><maml:para>If you are attempting to kill your own login sessions, the process performing the kills will be skipped.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaProcess</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more spids to be killed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one or more spids which will not be killed. Options for this parameter are auto-populated from the server. Exclude is the last filter to run, so even if a spid matches (for example) Hosts, if it's listed in Exclude it wil be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases whose processes will be killed. Options for this parameter are auto-populated from the server and only databases that have active processes are offered. This parameter is auto-populated from -SqlInstance and allows only database names that have active processes. You can specify one or more Databases whose processes will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more login names whose processes will be killed. Options for this parameter are auto-populated from the server and only login names that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more client hostnames whose processes will be killed. Options for this parameter are auto-populated from the server and only hostnames that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more client programs whose processes will be killed. Options for this parameter are auto-populated from the server and only programs that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaProcess</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more spids to be killed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one or more spids which will not be killed. Options for this parameter are auto-populated from the server. Exclude is the last filter to run, so even if a spid matches (for example) Hosts, if it's listed in Exclude it wil be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases whose processes will be killed. Options for this parameter are auto-populated from the server and only databases that have active processes are offered. This parameter is auto-populated from -SqlInstance and allows only database names that have active processes. You can specify one or more Databases whose processes will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more login names whose processes will be killed. Options for this parameter are auto-populated from the server and only login names that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more client hostnames whose processes will be killed. Options for this parameter are auto-populated from the server and only hostnames that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more client programs whose processes will be killed. Options for this parameter are auto-populated from the server and only programs that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaProcess</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more spids to be killed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one or more spids which will not be killed. Options for this parameter are auto-populated from the server. Exclude is the last filter to run, so even if a spid matches (for example) Hosts, if it's listed in Exclude it wil be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases whose processes will be killed. Options for this parameter are auto-populated from the server and only databases that have active processes are offered. This parameter is auto-populated from -SqlInstance and allows only database names that have active processes. You can specify one or more Databases whose processes will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more login names whose processes will be killed. Options for this parameter are auto-populated from the server and only login names that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more client hostnames whose processes will be killed. Options for this parameter are auto-populated from the server and only hostnames that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more client programs whose processes will be killed. Options for this parameter are auto-populated from the server and only programs that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>This is the process object passed by Get-DbaProcess if using a pipeline.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies one or more databases whose processes will be killed. Options for this parameter are auto-populated from the server and only databases that have active processes are offered. This parameter is auto-populated from -SqlInstance and allows only database names that have active processes. You can specify one or more Databases whose processes will be killed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSpid</maml:name><maml:description><maml:para>Specifies one or more spids which will not be killed. Options for this parameter are auto-populated from the server. Exclude is the last filter to run, so even if a spid matches (for example) Hosts, if it's listed in Exclude it wil be excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Hostname</maml:name><maml:description><maml:para>Specifies one or more client hostnames whose processes will be killed. Options for this parameter are auto-populated from the server and only hostnames that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>This is the process object passed by Get-DbaProcess if using a pipeline.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies one or more login names whose processes will be killed. Options for this parameter are auto-populated from the server and only login names that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Program</maml:name><maml:description><maml:para>Specifies one or more client programs whose processes will be killed. Options for this parameter are auto-populated from the server and only programs that have active processes are offered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Spid</maml:name><maml:description><maml:para>Specifies one or more spids to be killed. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Process Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaProcess -SqlInstance sqlserver2014a -Login base\ctrlb, sa </dev:code><dev:remarks><maml:para> Finds all processes for base\ctrlb and sa on sqlserver2014a, then kills them. Uses Windows Authentication to login to sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaProcess -SqlInstance sqlserver2014a -SqlCredential $credential -Spid 56, 77 </dev:code><dev:remarks><maml:para> Finds processes for spid 56 and 57, then kills them. Uses alternative (SQL or Windows) credentials to login to sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaProcess -SqlInstance sqlserver2014a -Program 'Microsoft SQL Server Management Studio' </dev:code><dev:remarks><maml:para> Finds processes that were created in Microsoft SQL Server Management Studio, then kills them. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaProcess -SqlInstance sqlserver2014a -Hostname workstationx, server100 </dev:code><dev:remarks><maml:para> Finds processes that were initiated (computers/clients) workstationx and server 1000, then kills them. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaProcess -SqlInstance sqlserver2014 -Database tempdb -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were executed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaProcess -SqlInstance sql2016 -Program 'dbatools PowerShell module - dbatools.io' | Stop-DbaProcess </dev:code><dev:remarks><maml:para> Finds processes that were created with dbatools, then kills them. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaProcess</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaService</command:name><command:noun>DbaService</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops SQL Server services on a computer.</maml:para></maml:description></command:details><maml:description><maml:para>Stops the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.</maml:para><maml:para>Requires Local Admin rights on destination computer(s).</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaService</maml:name><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Use this switch to stop dependent services before proceeding with the specified service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaService</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Use this switch to stop dependent services before proceeding with the specified service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the computer as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>Use this switch to stop dependent services before proceeding with the specified service</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services from Get-DbaService</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only affects services that belong to the specific instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers. Parameters ComputerName and InstanceName will be ignored if SqlInstance is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Timeout</maml:name><maml:description><maml:para>How long to wait for the start/stop request completion before moving on. Specify 0 to wait indefinitely.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Use -Type to collect only services of the desired SqlServiceType. Can be one of the following: "Agent","Browser","Engine","FullText","SSAS","SSIS","SSRS"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, Stop Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires Local Admin rights on destination computer(s). </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaService -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Stops the SQL Server related services on computer sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'sql1','sql2','sql3'| Get-DbaService | Stop-DbaService </dev:code><dev:remarks><maml:para> Gets the SQL Server related services on computers sql1, sql2 and sql3 and stops them. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaService -ComputerName sql1,sql2 -Instance MSSQLSERVER </dev:code><dev:remarks><maml:para> Stops the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaService -ComputerName $MyServers -Type SSRS </dev:code><dev:remarks><maml:para> Stops the SQL Server related services of type "SSRS" (Reporting Services) on computers in the variable MyServers. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaService -ComputerName sql1 -Type Engine -Force </dev:code><dev:remarks><maml:para> Stops SQL Server database engine services on sql1 forcing dependent SQL Server Agent services to stop as well. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaService</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaTrace</command:name><command:noun>DbaTrace</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops SQL Server traces</maml:para></maml:description></command:details><maml:description><maml:para>Stops SQL Server traces</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaTrace</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Id</maml:name><maml:description><maml:para>A list of trace ids</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Internal parameter for piping</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Trace Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaTrace -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> Stops all traces on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaTrace -SqlInstance sql2008 -Id 1 </dev:code><dev:remarks><maml:para> Stops all trace with ID 1 on sql2008 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaTrace -SqlInstance sql2008 | Out-GridView -PassThru | Stop-DbaTrace </dev:code><dev:remarks><maml:para> Stops selected traces on sql2008 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaTrace</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops Extended Events sessions.</maml:para></maml:description></command:details><maml:description><maml:para>This script stops Extended Events sessions on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Specifies individual Extended Events sessions to stop.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaXESession</maml:name><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>If this switch is enabled, all Extended Events sessions will be stopped except the packaged sessions AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-DbaXESession</maml:name><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaXESession as the list of sessions to be stopped.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AllSessions</maml:name><maml:description><maml:para>If this switch is enabled, all Extended Events sessions will be stopped except the packaged sessions AlwaysOn_health, system_health, telemetry_xevents.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts the object output by Get-DbaXESession as the list of sessions to be stopped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Specifies individual Extended Events sessions to stop.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Doug Meyers Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaXESession -SqlInstance sqlserver2012 -AllSessions </dev:code><dev:remarks><maml:para> Stops all Extended Event Session on the sqlserver2014 instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Stop-DbaXESession -SqlInstance sqlserver2012 -Session xesession1,xesession2 </dev:code><dev:remarks><maml:para> Stops the xesession1 and xesession2 Extended Event sessions. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sqlserver2012 -Session xesession1 | Stop-DbaXESession </dev:code><dev:remarks><maml:para> Stops the sessions returned from the Get-DbaXESession function. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Stop-DbaXESmartTarget</command:name><command:noun>DbaXESmartTarget</command:noun><command:verb>Stop</command:verb><maml:description><maml:para>Stops an XESmartTarget PowerShell job. Useful if you want to run a target, but not right now.</maml:para></maml:description></command:details><maml:description><maml:para>Stops an XESmartTarget PowerShell job. Useful if you want to run a target, but not right now.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-DbaXESmartTarget</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The XESmartTarget job object.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>The XESmartTarget job object.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl) | SmartTarget by Gianluca Sartori (@spaghettidba) Please check the wiki - https://github.com/spaghettidba/XESmartTarget/wiki Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESmartTarget | Stop-DbaXESmartTarget </dev:code><dev:remarks><maml:para> Stops all XESmartTarget jobs. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESmartTarget | Where-Object Id -eq 2 | Stop-DbaXESmartTarget </dev:code><dev:remarks><maml:para> Stops a specific XESmartTarget job. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Stop-DbaXESmartTarget</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Suspend-DbaAgDbDataMovement</command:name><command:noun>DbaAgDbDataMovement</command:noun><command:verb>Suspend</command:verb><maml:description><maml:para>Suspends data movement for an availability group database on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Suspends data movement for an availability group database on a SQL Server instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Suspend-DbaAgDbDataMovement</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group where the database movement will be suspended.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to suspend movement upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The availability group where the database movement will be suspended.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database or databases to suspend movement upon.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAgDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Suspend-DbaAgDbDataMovement -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1, db2 </dev:code><dev:remarks><maml:para> Suspends data movement on db1 and db2 to ag1 on sql2017a. Prompts for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAgDatabase -SqlInstance sql2017a, sql2019 | Out-GridView -Passthru | Suspend-DbaAgDbDataMovement -Confirm:$false </dev:code><dev:remarks><maml:para> Suspends data movement on the selected availability group databases. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Suspend-DbaAgDbDataMovement</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Sync-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Sync</command:verb><maml:description><maml:para>Syncs dependent objects such as jobs, logins and custom errors for availability groups</maml:para></maml:description></command:details><maml:description><maml:para>Syncs dependent objects for availability groups. Such objects include:</maml:para><maml:para>SpConfigure</maml:para><maml:para>CustomErrors</maml:para><maml:para>Credentials</maml:para><maml:para>DatabaseMail</maml:para><maml:para>LinkedServers</maml:para><maml:para>Logins</maml:para><maml:para>LoginPermissions</maml:para><maml:para>SystemTriggers</maml:para><maml:para>DatabaseOwner</maml:para><maml:para>AgentCategory</maml:para><maml:para>AgentOperator</maml:para><maml:para>AgentAlert</maml:para><maml:para>AgentProxy</maml:para><maml:para>AgentSchedule</maml:para><maml:para>AgentJob</maml:para><maml:para>Note that any of these can be excluded. For specific object exclusions (such as a single job), using the underlying Copy-Dba* command will be required.</maml:para><maml:para>This command does not filter by which logins are in use by the ag databases or which linked servers are used. All objects that are not excluded will be copied like hulk smash.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Sync-DbaAvailabilityGroup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>The primary SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to export SpConfigure CustomErrors Credentials DatabaseMail LinkedServers Logins LoginPermissions SystemTriggers DatabaseOwner AgentCategory AgentOperator AgentAlert AgentProxy AgentSchedule AgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specific logins to sync. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>Specific logins to exclude when performing the sync. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specific jobs to sync. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specific jobs to exclude when performing the sync. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the newly migrated job will be disabled on the destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the objects will dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisableJobOnDestination</maml:name><maml:description><maml:para>If this switch is enabled, the newly migrated job will be disabled on the destination server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Exclude</maml:name><maml:description><maml:para>Exclude one or more objects to export SpConfigure CustomErrors Credentials DatabaseMail LinkedServers Logins LoginPermissions SystemTriggers DatabaseOwner AgentCategory AgentOperator AgentAlert AgentProxy AgentSchedule AgentJob</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specific jobs to exclude when performing the sync. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>Specific logins to exclude when performing the sync. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the objects will dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaAvailabilityGroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specific jobs to sync. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specific logins to sync. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>The primary SQL Server instance. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PrimarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AG, HA Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Sync-DbaAvailabilityGroup -Primary sql2016a -AvailabilityGroup db3 </dev:code><dev:remarks><maml:para> Syncs the following on all replicas found in the db3 AG: SpConfigure, CustomErrors, Credentials, DatabaseMail, LinkedServers Logins, LoginPermissions, SystemTriggers, DatabaseOwner, AgentCategory, AgentOperator, AgentAlert, AgentProxy, AgentSchedule, AgentJob </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2016a | Sync-DbaAvailabilityGroup -ExcludeType LoginPermissions, LinkedServers -ExcludeLogin login1, login2 -Job job1, job2 </dev:code><dev:remarks><maml:para> Syncs the following on all replicas found in all AGs on the specified instance: SpConfigure, CustomErrors, Credentials, DatabaseMail, Logins, SystemTriggers, DatabaseOwner, AgentCategory, AgentOperator AgentAlert, AgentProxy, AgentSchedule, AgentJob. Copies all logins except for login1 and login2 and only syncs job1 and job2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaAvailabilityGroup -SqlInstance sql2016a | Sync-DbaAvailabilityGroup -WhatIf </dev:code><dev:remarks><maml:para> Shows what would happen if the command were to run but doesn't actually perform the action. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Sync-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Sync-DbaLoginPermission</command:name><command:noun>DbaLoginPermission</command:noun><command:verb>Sync</command:verb><maml:description><maml:para>Copies SQL login permissions from one server to another.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Sync-DbaLoginPermission</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>The login(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process. Options for this list are auto-populated from the server. If unspecified, all logins will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration, Login Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Sync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Syncs only SQL Server login permissions, roles, etc. Does not add or drop logins or users. To copy logins and their permissions, use Copy-SqlLogin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Sync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster -Exclude realcajun -SourceSqlCredential $scred -DestinationSqlCredential $dcred </dev:code><dev:remarks><maml:para> Copies 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Sync-DbaLoginPermission -Source sqlserver2014a -Destination sqlcluster -Login realcajun, netnerds </dev:code><dev:remarks><maml:para> Copies permissions ONLY for logins netnerds and realcajun. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Sync-DbaLoginPermission</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaAgentJobOwner</command:name><command:noun>DbaAgentJobOwner</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks SQL Agent Job owners against a login to validate which jobs do not match that owner.</maml:para></maml:description></command:details><maml:description><maml:para>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 'sa' for ownership, but the user can pass a specific login if they use something else.</maml:para><maml:para>Only SQL Agent Jobs that do not match this ownership will be displayed.</maml:para><maml:para>Best practice reference: https://www.itprotoday.com/sql-server-tip-assign-ownership-jobs-sysadmin-account</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaAgentJobOwner</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specifies the job(s) to process. Options for this list are auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specifies the job(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeJob</maml:name><maml:description><maml:para>Specifies the job(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Job</maml:name><maml:description><maml:para>Specifies the job(s) to process. Options for this list are auto-populated from the server. If unspecified, all jobs will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Agent, Job, Owner Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaAgentJobOwner -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all SQL Agent Jobs where the owner does not match 'sa'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaAgentJobOwner -SqlInstance localhost -ExcludeJob 'syspolicy_purge_history' </dev:code><dev:remarks><maml:para> Returns SQL Agent Jobs except for the syspolicy_purge_history job </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaAgentJobOwner -SqlInstance localhost -Login DOMAIN\account </dev:code><dev:remarks><maml:para> Returns all SQL Agent Jobs where the owner does not match DOMAIN\account. Note that Login must be a valid security principal that exists on the target server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaAgentJobOwner</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaAvailabilityGroup</command:name><command:noun>DbaAvailabilityGroup</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests the health of an Availability Group and prerequisites for changing it.</maml:para></maml:description></command:details><maml:description><maml:para>Tests the health of an Availability Group.</maml:para><maml:para>Can also test whether all prerequisites for Add-DbaAgDatabase are met.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaAvailabilityGroup</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The primary replica of the Availability Group.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group to test.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddDatabase</maml:name><maml:description><maml:para>Test whether all prerequisites for Add-DbaAgDatabase to add these databases to the Availability Group are met. Use Secondary, SecondarySqlCredential, SeedingMode, SharedPath and UseLastBackup with the same values that will be used with Add-DbaAgDatabase later.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AddDatabase</maml:name><maml:description><maml:para>Test whether all prerequisites for Add-DbaAgDatabase to add these databases to the Availability Group are met. Use Secondary, SecondarySqlCredential, SeedingMode, SharedPath and UseLastBackup with the same values that will be used with Add-DbaAgDatabase later.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AvailabilityGroup</maml:name><maml:description><maml:para>The name of the Availability Group to test.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecondarySqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SeedingMode</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SharedPath</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The primary replica of the Availability Group.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseLastBackup</maml:name><maml:description><maml:para>Only used when AddDatabase is used. See documentation at Add-DbaAgDatabase for more details.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AvailabilityGroup, HA, AG, Test Author: Andreas Jordan (@JordanOrdix), ordix.de Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaAvailabilityGroup -SqlInstance SQL2016 -AvailabilityGroup TestAG1 </dev:code><dev:remarks><maml:para> Test Availability Group TestAG1 with SQL2016 as the primary replica. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaAvailabilityGroup -SqlInstance SQL2016 -AvailabilityGroup TestAG1 -AddDatabase AdventureWorks -SeedingMode Automatic </dev:code><dev:remarks><maml:para> Test if database AdventureWorks can be added to the Availability Group TestAG1 with automatic seeding. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaAvailabilityGroup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaBackupEncrypted</command:name><command:noun>DbaBackupEncrypted</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests to see if a backup is encrypted</maml:para></maml:description></command:details><maml:description><maml:para>Tests to see if a backup is encrypted</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaBackupEncrypted</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The path to the backups</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>The path to the backups</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backups, Encryption Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2022 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBackupEncrypted -SqlInstance sql01 -Path /tmp/northwind.bak </dev:code><dev:remarks><maml:para> Test to see if /tmp/northwind.bak is encrypted </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-ChildItem \\nas\sql\backups | Test-DbaBackupEncrypted -SqlInstance sql01 </dev:code><dev:remarks><maml:para> Test to see if all of the backups in \\nas\sql\backups are encrypted </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaBackupEncrypted</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaBackupInformation</command:name><command:noun>DbaBackupInformation</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests a dbatools backup history object is correct for restoring</maml:para></maml:description></command:details><maml:description><maml:para>Input is normally from a backup history object generated from `Format-DbaBackupInformation`. This is then parse to check that it's valid for restore. Tests performed include:</maml:para><maml:para> - Checking unbroken LSN chain</maml:para><maml:para> - If the target database exists and WithReplace has been provided</maml:para><maml:para> - If any files already exist, but owned by other databases</maml:para><maml:para> - Creates any new folders required</maml:para><maml:para> - That the backup files exists at the location specified, and can be seen by the Sql Instance</maml:para><maml:para> - If no errors are found then the objects for that database will me marked as Verified</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaBackupInformation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>dbatools BackupHistory object. Normally this will have been process with `Select-` and then `Format-DbaBackupInformation`</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The Sql Server instance that wil be performing the restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>By default we won't overwrite an existing database, this switch tells us you want to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Switch to indicate a continuing restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>This switch indicates that you only wish to verify a restore, so runs a smaller number of tests as you won't be writing anything to the restore server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch to disable path creation. Will write a warning that a path does not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BackupHistory</maml:name><maml:description><maml:para>dbatools BackupHistory object. Normally this will have been process with `Select-` and then `Format-DbaBackupInformation`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Switch to indicate a continuing restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>OutputScriptOnly</maml:name><maml:description><maml:para>Switch to disable path creation. Will write a warning that a path does not exist</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The Sql Server instance that wil be performing the restore</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>This switch indicates that you only wish to verify a restore, so runs a smaller number of tests as you won't be writing anything to the restore server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>WithReplace</maml:name><maml:description><maml:para>By default we won't overwrite an existing database, this switch tells us you want to</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Backup, Restore, DisasterRecovery Author: Stuart Moore (@napalmgram), stuart-moore.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $BackupHistory | Test-DbaBackupInformation -SqlInstance MyInstance </dev:code><dev:remarks><maml:para> PS C:\> $PassedDbs = $BackupHistory | Where-Object {$_.IsVerified -eq $True} PS C:\> $FailedDbs = $BackupHistory | Where-Object {$_.IsVerified -ne $True} Pass in a BackupHistory object to be tested against MyInstance. Those records that pass are marked as verified. We can then use the IsVerified property to divide the failures and successes </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaBackupInformation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaBuild</command:name><command:noun>DbaBuild</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Returns SQL Server Build "compliance" level on a build.</maml:para></maml:description></command:details><maml:description><maml:para>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".</maml:para><maml:para>The build data used can be found here: https://dbatools.io/builds</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaBuild</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Build</maml:name><maml:description><maml:para>Instead of connecting to a real instance, pass a string identifying the build to get the info back.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Version[]</command:parameterValue><dev:type><maml:name>System.Version[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumBuild</maml:name><maml:description><maml:para>This is the build version to test "compliance" against. Anything below this is flagged as not compliant.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Version</command:parameterValue><dev:type><maml:name>Version</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxBehind</maml:name><maml:description><maml:para>Instead of using a specific MinimumBuild here you can pass "how many service packs and cu back" is the targeted compliance level. You can use xxSP or xxCU or both, where xx is a number. See the Examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Latest</maml:name><maml:description><maml:para>Shortcut for specifying the very most up-to-date build available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their compliance state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Looks online for the most up to date reference, replacing the local one.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Quiet</maml:name><maml:description><maml:para>Makes the function just return $true/$false. It's useful if you use Test-DbaBuild in your own scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Build</maml:name><maml:description><maml:para>Instead of connecting to a real instance, pass a string identifying the build to get the info back.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Version[]</command:parameterValue><dev:type><maml:name>System.Version[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Latest</maml:name><maml:description><maml:para>Shortcut for specifying the very most up-to-date build available.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxBehind</maml:name><maml:description><maml:para>Instead of using a specific MinimumBuild here you can pass "how many service packs and cu back" is the targeted compliance level. You can use xxSP or xxCU or both, where xx is a number. See the Examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MinimumBuild</maml:name><maml:description><maml:para>This is the build version to test "compliance" against. Anything below this is flagged as not compliant.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Version</command:parameterValue><dev:type><maml:name>Version</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Quiet</maml:name><maml:description><maml:para>Makes the function just return $true/$false. It's useful if you use Test-DbaBuild in your own scripts.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>Target any number of instances, in order to return their compliance state.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Update</maml:name><maml:description><maml:para>Looks online for the most up to date reference, replacing the local one.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SqlBuild, Version, Utility Author: Simone Bizzotto (@niphold) | Friedrich Weinmann (@FredWeinmann) dbatools PowerShell module (https://dbatools.io) Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.5540" -MinimumBuild "12.0.5557" </dev:code><dev:remarks><maml:para> Returns 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 build is "12.0.5557" (which is SQL 2014 with SP2 and CU8). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.5540" -MaxBehind "1SP" </dev:code><dev:remarks><maml:para> Returns information about a build identified by "12.0.5540", making sure it is AT MOST 1 Service Pack "behind". For that version, that identifies an SP2, means accepting as the lowest compliance version as "12.0.4110", that identifies 2014 with SP1. Output column CUTarget is not relevant (empty). SPTarget and BuildTarget are filled in the result. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.5540" -MaxBehind "1SP 1CU" </dev:code><dev:remarks><maml:para> Returns 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, that 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 will be "12.0.4511", which is 2014 with SP1 and CU12. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.5540" -MaxBehind "0CU" </dev:code><dev:remarks><maml:para> Returns information about a build identified by "12.0.5540", making sure it is the latest CU release. Output columns CUTarget, SPTarget and BuildTarget are relevant. If the latest build is a service pack (not a CU), CUTarget will be empty. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.5540" -Latest </dev:code><dev:remarks><maml:para> Returns information about a build identified by "12.0.5540", making sure it is the latest build available. Output columns CUTarget and SPTarget are not relevant (empty), only the BuildTarget is. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.00.4502" -MinimumBuild "12.0.4511" -Update </dev:code><dev:remarks><maml:para> Same as before, but tries to fetch the most up to date index online. When the online version is newer, the local one gets overwritten. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaBuild -Build "12.0.4502","10.50.4260" -MinimumBuild "12.0.4511" </dev:code><dev:remarks><maml:para> Returns information builds identified by these versions strings. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a | Test-DbaBuild -MinimumBuild "12.0.4511" </dev:code><dev:remarks><maml:para> Integrate with other cmdlets to have builds checked for all your registered servers on sqlserver2014a. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaBuild</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaCmConnection</command:name><command:noun>DbaCmConnection</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests over which paths a computer can be managed.</maml:para></maml:description></command:details><maml:description><maml:para>Tests over which paths a computer can be managed.</maml:para><maml:para>This function tries out the connectivity for:</maml:para><maml:para>- Cim over WinRM</maml:para><maml:para>- Cim over DCOM</maml:para><maml:para>- Wmi</maml:para><maml:para>- PowerShellRemoting</maml:para><maml:para>Results 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.</maml:para><maml:para>This function ignores global configuration settings limiting which protocols may be used.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaCmConnection</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to test against.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use when running the test. Bad credentials are automatically cached as non-working. This behavior can be disabled by the 'Cache.Management.Disable.BadCredentialList' configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The connection protocol types to test. By default, all types are tested. Note that this function will ignore global configurations limiting the types of connections available and test all connections specified here instead. Available connection protocol types: "CimRM", "CimDCOM", "Wmi", "PowerShellRemoting"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Alert will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer to test against.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaCmConnectionParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credentials to use when running the test. Bad credentials are automatically cached as non-working. This behavior can be disabled by the 'Cache.Management.Disable.BadCredentialList' configuration.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Alert will be dropped and recreated on Destination.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The connection protocol types to test. By default, all types are tested. Note that this function will ignore global configurations limiting the types of connections available and test all connections specified here instead. Available connection protocol types: "CimRM", "CimDCOM", "Wmi", "PowerShellRemoting"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Connection.ManagementConnectionType[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ComputerManagement, CIM Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT **This function should not be called from within dbatools. It is meant as a tool for users only.** </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaCmConnection -ComputerName sql2014 </dev:code><dev:remarks><maml:para> Performs 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaCmConnection -ComputerName sql2014 -Credential $null -Type CimDCOM, CimRM </dev:code><dev:remarks><maml:para> This test will run a connectivity test of CIM over DCOM and CIM over WinRM against the computer sql2014 using Windows Authentication. The results will be reported and registered. Future calls from Get-DbaCmObject will recognize the results and optimize the query. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaCmConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaComputerCertificateExpiration</command:name><command:noun>DbaComputerCertificateExpiration</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests for certificates that are expiring soon</maml:para></maml:description></command:details><maml:description><maml:para>Tests for certificates that are expiring soon</maml:para><maml:para>By default, it tests candidates that are ideal for using with SQL Server's network encryption</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaComputerCertificateExpiration</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of certificates to return. All, Service or SQL Server. All is all certificates Service is certificates that are candidates for SQL Server services (But may be for IIS, etc) SQL Server is certificates currently in use by SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to a certificate - basically changes the path into a certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Return certificate based on thumbprint</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Number of days before expiration to warn. Defaults to 30.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must specify the distinct nodes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Allows you to login to $ComputerName using alternative credentials.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Folder</maml:name><maml:description><maml:para>Certificate folder - defaults to My (Personal)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The path to a certificate - basically changes the path into a certificate object</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Store</maml:name><maml:description><maml:para>Certificate store - defaults to LocalMachine</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Number of days before expiration to warn. Defaults to 30.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Thumbprint</maml:name><maml:description><maml:para>Return certificate based on thumbprint</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>The type of certificates to return. All, Service or SQL Server. All is all certificates Service is certificates that are candidates for SQL Server services (But may be for IIS, etc) SQL Server is certificates currently in use by SQL Server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate, Security Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaComputerCertificateExpiration </dev:code><dev:remarks><maml:para> Gets computer certificates on localhost that are candidates for using with SQL Server's network encryption then checks to see if they'll be expiring within 30 days </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaComputerCertificateExpiration -ComputerName sql2016 -Threshold 90 </dev:code><dev:remarks><maml:para> Gets computer certificates on sql2016 that are candidates for using with SQL Server's network encryption then checks to see if they'll be expiring within 90 days </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaComputerCertificateExpiration -ComputerName sql2016 -Thumbprint 8123472E32AB412ED4288888B83811DB8F504DED, 04BFF8B3679BB01A986E097868D8D494D70A46D6 </dev:code><dev:remarks><maml:para> Gets computer certificates on sql2016 that match thumbprints 8123472E32AB412ED4288888B83811DB8F504DED or 04BFF8B3679BB01A986E097868D8D494D70A46D6 then checks to see if they'll be expiring within 30 days </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaComputerCertificateExpiration</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaConnection</command:name><command:noun>DbaConnection</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests the connection to a single instance.</maml:para></maml:description></command:details><maml:description><maml:para>Tests the ability to connect to an SQL Server instance outputting information about the server and instance.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaConnection</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user. Utilized for gathering PSRemoting and TCPPort information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipPSRemoting</maml:name><maml:description><maml:para>This switch will skip the test for PSRemoting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Credential object used to connect to the Computer as a different user. Utilized for gathering PSRemoting and TCPPort information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SkipPSRemoting</maml:name><maml:description><maml:para>This switch will skip the test for PSRemoting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Connection Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaConnection SQL2016 </dev:code><dev:remarks><maml:para> ComputerName : SQL2016 InstanceName : MSSQLSERVER SqlInstance : sql2016 SqlVersion : 13.0.4001 ConnectingAsUser : BASE\ctrlb ConnectSuccess : True AuthType : Windows Authentication AuthScheme : KERBEROS TcpPort : 1433 IPAddress : 10.2.1.5 NetBiosName : sql2016.base.local IsPingable : True PSRemotingAccessible : True DomainName : base.local LocalWindows : 10.0.15063.0 LocalPowerShell : 5.1.15063.502 LocalCLR : 4.0.30319.42000 LocalSMOVersion : 13.0.0.0 LocalDomainUser : True LocalRunAsAdmin : False LocalEdition : Desktop Test connection to SQL2016 and outputs information collected </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $winCred = Get-Credential sql2017\Administrator </dev:code><dev:remarks><maml:para> PS C:\> $sqlCred = Get-Credential sa PS C:\> Test-DbaConnection SQL2017 -SqlCredential $sqlCred -Credential $winCred ComputerName : SQL2017 InstanceName : MSSQLSERVER SqlInstance : sql2017 SqlVersion : 14.0.3356 ConnectingAsUser : sa ConnectSuccess : True AuthType : SQL Authentication AuthScheme : SQL TcpPort : 50164 IPAddress : 10.10.10.15 NetBiosName : sql2017.company.local IsPingable : True PSRemotingAccessible : True DomainName : company.local LocalWindows : 10.0.15063.0 LocalPowerShell : 5.1.19041.610 LocalCLR : 4.0.30319.42000 LocalSMOVersion : 15.100.0.0 LocalDomainUser : True LocalRunAsAdmin : False LocalEdition : Desktop Test connection to SQL2017 instance and collecting information on SQL Server using the sa login, local Administrator account is used to collect port information </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaConnectionAuthScheme</command:name><command:noun>DbaConnectionAuthScheme</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Returns the transport protocol and authentication scheme of the connection. This is useful to determine if your connection is using Kerberos.</maml:para></maml:description></command:details><maml:description><maml:para>By default, this command will return the ConnectName, ServerName, Transport and AuthScheme of the current connection.</maml:para><maml:para>ConnectName 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.</maml:para><maml:para>If -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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaConnectionAuthScheme</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server(s) must be SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Kerberos</maml:name><maml:description><maml:para>If this switch is enabled, checks will be made for Kerberos authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Ntlm</maml:name><maml:description><maml:para>If this switch is enabled, checks will be made for NTLM authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Kerberos</maml:name><maml:description><maml:para>If this switch is enabled, checks will be made for Kerberos authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Ntlm</maml:name><maml:description><maml:para>If this switch is enabled, checks will be made for NTLM authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Server(s) must be SQL Server 2005 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN, Kerberos Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaConnectionAuthScheme -SqlInstance sqlserver2014a, sql2016 </dev:code><dev:remarks><maml:para> Returns ConnectName, ServerName, Transport and AuthScheme for sqlserver2014a and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaConnectionAuthScheme -SqlInstance sqlserver2014a -Kerberos </dev:code><dev:remarks><maml:para> Returns $true or $false depending on if the connection is Kerberos or not. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaConnectionAuthScheme -SqlInstance sqlserver2014a | Select-Object * </dev:code><dev:remarks><maml:para> Returns the results of "SELECT * from sys.dm_exec_connections WHERE session_id = @@SPID" </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaConnectionAuthScheme</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbCollation</command:name><command:noun>DbaDbCollation</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Compares Database Collations to Server Collation</maml:para></maml:description></command:details><maml:description><maml:para>Compares Database Collations to Server Collation</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbCollation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Collation Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCollation -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns server name, database name and true/false if the collations match for all databases on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCollation -SqlInstance sqlserver2014a -Database db1, db2 </dev:code><dev:remarks><maml:para> Returns information for the db1 and db2 databases on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCollation -SqlInstance sqlserver2014a, sql2016 -Exclude db1 </dev:code><dev:remarks><maml:para> Returns information for database and server collations for all databases except db1 on sqlserver2014a and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2016 | Test-DbaDbCollation </dev:code><dev:remarks><maml:para> Returns db/server collation information for every database on every server listed in the Central Management Server on sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbCollation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbCompatibility</command:name><command:noun>DbaDbCompatibility</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Compares Database Compatibility level to Server Compatibility</maml:para></maml:description></command:details><maml:description><maml:para>Compares Database Compatibility level to Server Compatibility</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbCompatibility</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Compatibility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompatibility -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns server name, database name and true/false if the compatibility level match for all databases on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompatibility -SqlInstance sqlserver2014a -Database db1, db2 </dev:code><dev:remarks><maml:para> Returns detailed information for database and server compatibility level for the db1 and db2 databases on sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompatibility -SqlInstance sqlserver2014a, sql2016 -Exclude db1 </dev:code><dev:remarks><maml:para> Returns detailed information for database and server compatibility level for all databases except db1 on sqlserver2014a and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sql2014 | Test-DbaDbCompatibility </dev:code><dev:remarks><maml:para> Returns db/server compatibility information for every database on every server listed in the Central Management Server on sql2016. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbCompatibility</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbCompression</command:name><command:noun>DbaDbCompression</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Returns tables and indexes with preferred compression setting.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>Remember 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.</maml:para><maml:para>Test-DbaDbCompression script derived from GitHub and the Tiger Team's repository: (https://github.com/Microsoft/tigertoolbox/tree/master/Evaluate-Compression-Gains)</maml:para><maml:para>In the output, you will find the following information:</maml:para><maml:para>- 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.</maml:para><maml:para>- 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.</maml:para><maml:para>- Column Compression_Type_Recommendation can have four possible outputs indicating where there is most gain, if any: 'PAGE', 'ROW', 'NO_GAIN' or '?'. When the output is '?' 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 'NO_GAIN' 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.</maml:para><maml:para>This script will execute on the context of the current database.</maml:para><maml:para>Also be aware that this may take a while to execute on large objects, because if the IS locks taken by the</maml:para><maml:para>sp_estimate_data_compression_savings cannot be honored, the SP will be blocked.</maml:para><maml:para>It only considers Row or Page Compression (not column compression)</maml:para><maml:para>It only evaluates User Tables</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbCompression</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Filter to only get specific schemas If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Filter to only get specific tables If unspecified, all User tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResultSize</maml:name><maml:description><maml:para>Allows you to limit the number of results returned, as some systems can have very large number of tables. Default value is no restriction.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rank</maml:name><maml:description><maml:para>Allows you to specify the field used for ranking when determining the ResultSize Can be either TotalPages, UsedPages or TotalRows with default of TotalPages. Only applies when ResultSize is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterBy</maml:name><maml:description><maml:para>Allows you to specify level of filtering when determining the ResultSize Can be at either Table, Index or Partition level with default of Partition. Only applies when ResultSize is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterBy</maml:name><maml:description><maml:para>Allows you to specify level of filtering when determining the ResultSize Can be at either Table, Index or Partition level with default of Partition. Only applies when ResultSize is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Rank</maml:name><maml:description><maml:para>Allows you to specify the field used for ranking when determining the ResultSize Can be either TotalPages, UsedPages or TotalRows with default of TotalPages. Only applies when ResultSize is used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ResultSize</maml:name><maml:description><maml:para>Allows you to limit the number of results returned, as some systems can have very large number of tables. Default value is no restriction.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Filter to only get specific schemas If unspecified, all schemas will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>Filter to only get specific tables If unspecified, all User tables will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Accepts a DbaInstanceParameter. Any collection of SQL Server Instance names or SMO objects can be piped to command.</maml:name><maml:uri /><maml:description /></dev:type></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Returns a PsCustomObject with following fields: ComputerName, InstanceName, SqlInstance, Database, IndexName, Partition, IndexID, PercentScan, PercentUpdate, RowEstimatePercentOriginal, PageEstimatePercentOriginal, CompressionTypeRecommendation, SizeCurrent, SizeRequested, PercentCompression</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Compression, Table Author: Jason Squires (@js_0505), jstexasdba@gmail.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompression -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompression -SqlInstance ServerA </dev:code><dev:remarks><maml:para> Returns results of all potential compression options for all databases on the instance ServerA </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompression -SqlInstance ServerA -Database DBName | Out-GridView </dev:code><dev:remarks><maml:para> Returns 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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Test-DbaDbCompression -SqlInstance ServerA -ExcludeDatabase MyDatabase -SqlCredential $cred Returns results of all potential compression options for all databases except MyDatabase on instance ServerA using SQL credentials to authentication to ServerA. Returns the recommendation of either Page, Row or NO_GAIN </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompression -SqlInstance ServerA -Schema Test -Table MyTable </dev:code><dev:remarks><maml:para> Returns results of all potential compression options for the Table Test.MyTable in instance ServerA on ServerA and ServerB. Returns the recommendation of either Page, Row or NO_GAIN. Returns a result for each partition of any Heap, Clustered or NonClustered index. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbCompression -SqlInstance ServerA, ServerB -ResultSize 10 </dev:code><dev:remarks><maml:para> Returns results of all potential compression options for all databases on ServerA and ServerB. Returns the recommendation of either Page, Row or NO_GAIN. Returns results for the top 10 partitions by TotalPages used per database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> ServerA | Test-DbaDbCompression -Schema Test -ResultSize 10 -Rank UsedPages -FilterBy Table </dev:code><dev:remarks><maml:para> Returns results of all potential compression options for all databases on ServerA containing a schema Test Returns results for the top 10 Tables by Used Pages per database. Results are split by Table, Index and Partition so more than 10 results may be returned. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\> $servers | Test-DbaDbCompression -Database DBName | Out-GridView Returns results of all potential compression options for a single database DBName on Server1 or Server2 Returns the recommendation of either Page, Row or NO_GAIN in a nicely formatted GridView </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\> Test-DbaDbCompression -SqlInstance ServerA -Database MyDB -SqlCredential $cred -Schema Test -Table Test1, Test2 Returns results of all potential compression options for objects in Database MyDb on instance ServerA using SQL credentials to authentication to ServerA. Returns the recommendation of either Page, Row or NO_GAIN for tables with Schema Test and name in Test1 or Test2 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\> foreach ($svr in $servers) { >> Test-DbaDbCompression -SqlInstance $svr | Export-Csv -Path C:\temp\CompressionAnalysisPAC.csv -Append >> } This produces a full analysis of all your servers listed and is pushed to a csv for you to analyze. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbCompression</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbDataGeneratorConfig</command:name><command:noun>DbaDbDataGeneratorConfig</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks the data generation configuration if it's valid</maml:para></maml:description></command:details><maml:description><maml:para>When you're dealing with large data generation configurations, things can get complicated and messy.</maml:para><maml:para>This function will test for a range of rules and returns all the tables and columns that contain errors.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbDataGeneratorConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Path to the file to test</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Path to the file to test</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DataGeneration Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbDataGeneratorConfig -FilePath C:\temp\_datamasking\db1.json </dev:code><dev:remarks><maml:para> Test the configuration file </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbDataGeneratorConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbDataMaskingConfig</command:name><command:noun>DbaDbDataMaskingConfig</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks the masking configuration if it's valid</maml:para></maml:description></command:details><maml:description><maml:para>When you're dealing with large masking configurations, things can get complicated and messy.</maml:para><maml:para>This function will test for a range of rules and returns all the tables and columns that contain errors.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbDataMaskingConfig</maml:name><command:parameter required="true" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Path to the file to test</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilePath</maml:name><maml:description><maml:para>Path to the file to test</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Masking, DataMasking Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbDataMaskingConfig -FilePath C:\temp\_datamasking\db1.json </dev:code><dev:remarks><maml:para> Test the configuration file </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbDataMaskingConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbLogShipStatus</command:name><command:noun>DbaDbLogShipStatus</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Test-DbaDbLogShipStatus returns the status of your log shipping databases</maml:para></maml:description></command:details><maml:description><maml:para>Most of the time your log shipping "just works".</maml:para><maml:para>Checking your log shipping status can be done really easy with this function.</maml:para><maml:para>Make sure you're connecting to the monitoring instance of your log shipping infrastructure.</maml:para><maml:para>The function will return the status for a database. This can be one or more messages in a comma separated list.</maml:para><maml:para>If everything is OK with the database than you should only see the message "All OK".</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbLogShipStatus</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name. See examples for more info.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're not interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>By default all the information will be returned. If this parameter is used you get an overview with the SQL Instance, Database, Instance Type and the status</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the primary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name. See examples for more info.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Allows you to filter the results to only return the databases you're not interested in. This can be one or more values separated by commas. This is not a wildcard and should be the exact database name.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Primary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the primary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Secondary</maml:name><maml:description><maml:para>Allows to filter the results to only return values that apply to the secondary instance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Simple</maml:name><maml:description><maml:para>By default all the information will be returned. If this parameter is used you get an overview with the SQL Instance, Database, Instance Type and the status</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LogShipping Author: Sander Stad (@sqlstad), sqlstad.nl Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbLogShipStatus -SqlInstance sql1 </dev:code><dev:remarks><maml:para> Retrieves the log ship information from sql1 and displays all the information present including the status. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbLogShipStatus -SqlInstance sql1 -Database AdventureWorks2014 </dev:code><dev:remarks><maml:para> Retrieves the log ship information for just the database AdventureWorks. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbLogShipStatus -SqlInstance sql1 -Primary </dev:code><dev:remarks><maml:para> Retrieves the log ship information and only returns the information for the databases on the primary instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbLogShipStatus -SqlInstance sql1 -Secondary </dev:code><dev:remarks><maml:para> Retrieves the log ship information and only returns the information for the databases on the secondary instance. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbLogShipStatus -SqlInstance sql1 -Simple </dev:code><dev:remarks><maml:para> Retrieves the log ship information and only returns the columns SQL Instance, Database, Instance Type and Status </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbLogShipStatus</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbOwner</command:name><command:noun>DbaDbOwner</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks database owners against a login to validate which databases do not match that owner.</maml:para></maml:description></command:details><maml:description><maml:para>This function will check all databases on an instance against a SQL login to validate if that</maml:para><maml:para>login owns those databases or not. By default, the function will check against 'sa' for</maml:para><maml:para>ownership, but the user can pass a specific login if they use something else.</maml:para><maml:para>Best Practice reference: http://weblogs.sqlteam.com/dang/archive/2008/01/13/Database-Owner-Troubles.aspx</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbOwner</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogin</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetLogin</maml:name><maml:description><maml:para>Specifies the login that you wish check for ownership. This defaults to 'sa' or the sysadmin name if sa was renamed. This must be a valid security principal which exists on the target server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, Owner, DbOwner Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbOwner -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all databases where the owner does not match 'sa'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbOwner -SqlInstance localhost -TargetLogin 'DOMAIN\account' </dev:code><dev:remarks><maml:para> Returns all databases where the owner does not match 'DOMAIN\account'. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance localhost -OnlyAccessible | Test-DbaDbOwner </dev:code><dev:remarks><maml:para> Gets only accessible databases and checks where the owner does not match 'sa'. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbOwner</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbQueryStore</command:name><command:noun>DbaDbQueryStore</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Compares Query Store settings against best practices.</maml:para></maml:description></command:details><maml:description><maml:para>Evaluates Query Store against a set of rules to match best practices. The rules are:</maml:para><maml:para>* ActualState = ReadWrite (This means Query Store is enabled and collecting data.)</maml:para><maml:para>* DataFlushIntervalInSeconds = 900 (Recommended to leave this at the default of 900 seconds (15 mins).)</maml:para><maml:para>* MaxPlansPerQuery = 200 (Number of distinct plans per query. 200 is a good starting point for most environments.)</maml:para><maml:para>* MaxStorageSizeInMB = 2048 (How much disk space Query Store will use. 2GB is a good starting point.)</maml:para><maml:para>* QueryCaptureMode = Auto (With auto, queries that are insignificant from a resource utilization perspective, or executed infrequently, are not captured.)</maml:para><maml:para>* SizeBasedCleanupMode = Auto (With auto, as Query Store gets close to out of space it will automatically purge older data.)</maml:para><maml:para>* StaleQueryThresholdInDays = 30 (Determines how much historic data to keep. 30 days is a good value here.)</maml:para><maml:para>* StatisticsCollectionIntervalInMinutes = 30 (Time window that runtime stats will be aggregated. Use 30 unless you have space concerns, then leave at the default (60).)</maml:para><maml:para>* WaitStatsCaptureMode = ON (Adds valuable data when troubleshooting.)</maml:para><maml:para>* Trace Flag 7745 enabled</maml:para><maml:para>* Trace Flag 7752 enabled</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbQueryStore</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. This list is auto-populated from the server. If unspecified, all user databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. This list is auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piped input from Get-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Database, QueryStore Author: Jess Pomfret (@jpomfret), jesspomfret.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Based on Erin Stellato's (@erinstellato) Query Store Best Practices - https://www.sqlskills.com/blogs/erin/query-store-best-practices/ </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbQueryStore -SqlInstance localhost </dev:code><dev:remarks><maml:para> Checks that Query Store is enabled and meets best practices for all user databases on the localhost machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbQueryStore -SqlInstance localhost -Database AdventureWorks2017 </dev:code><dev:remarks><maml:para> Checks that Query Store is enabled and meets best practices for the AdventureWorks2017 database on the localhost machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbQueryStore -SqlInstance localhost -ExcludeDatabase AdventureWorks2017 </dev:code><dev:remarks><maml:para> Checks that Query Store is enabled and meets best practices for all user databases except AdventureWorks2017 on the localhost machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $databases = Get-DbaDatabase -SqlInstance localhost </dev:code><dev:remarks><maml:para> PS C:\> $databases | Test-DbaDbQueryStore Checks that Query Store is enabled and meets best practices for all databases that are piped on the localhost machine. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbQueryStore</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDbRecoveryModel</command:name><command:noun>DbaDbRecoveryModel</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Find if database is really a specific recovery model or not.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>However, you may also desire to validate if a database is SIMPLE or BULK LOGGED on an instance.</maml:para><maml:para>Inspired by Paul Randal's post (http://www.sqlskills.com/blogs/paul/new-script-is-that-database-really-in-the-full-recovery-mode/)</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDbRecoveryModel</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Specifies the type of recovery model you wish to test. By default it will test for FULL Recovery Model.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Specifies the database(s) to exclude from processing. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RecoveryModel</maml:name><maml:description><maml:para>Specifies the type of recovery model you wish to test. By default it will test for FULL Recovery Model.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbRecoveryModel -SqlInstance sql2005 </dev:code><dev:remarks><maml:para> Shows all databases where the configured recovery model is FULL and indicates whether or not they are really in FULL recovery model. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbRecoveryModel -SqlInstance . | Where-Object {$_.ActualRecoveryModel -ne "FULL"} </dev:code><dev:remarks><maml:para> Only shows the databases that are functionally in 'simple' mode. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbRecoveryModel -SqlInstance sql2008 -RecoveryModel Bulk_Logged | Sort-Object Server -Descending </dev:code><dev:remarks><maml:para> Shows all databases where the configured recovery model is BULK_LOGGED and sort them by server name descending </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDbRecoveryModel -SqlInstance localhost | Select-Object -Property * </dev:code><dev:remarks><maml:para> Shows all of the properties for the databases that have Full Recovery Model </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDbRecoveryModel</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDeprecatedFeature</command:name><command:noun>DbaDeprecatedFeature</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Displays information relating to deprecated features for SQL Server 2005 and above.</maml:para></maml:description></command:details><maml:description><maml:para>Displays information relating to deprecated features for SQL Server 2005 and above.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDeprecatedFeature</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of databases (such as returned by Get-DbaDatabase), to be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deprecated, General Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Test-DbaDeprecatedFeature </dev:code><dev:remarks><maml:para> Check deprecated features on server sql2008 for only the testdb and db2 databases </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2008 -Database testdb, db2 | Test-DbaDeprecatedFeature | Select-Object * </dev:code><dev:remarks><maml:para> See the object definition in the output as well </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDeprecatedFeature -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check deprecated features for all databases on the servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDeprecatedFeature -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Check deprecated features on server sql2008 for only the TestDB database </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDeprecatedFeature</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDiskAlignment</command:name><command:noun>DbaDiskAlignment</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Verifies that your non-dynamic disks are aligned according to physical constraints.</maml:para></maml:description></command:details><maml:description><maml:para>Verifies that your non-dynamic disks are aligned according to physical constraints.</maml:para><maml:para>Returns one row per computer, partition and stripe size with.</maml:para><maml:para>Please refer to your storage vendor best practices before following any advice below.</maml:para><maml:para>By 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.</maml:para><maml:para>While 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 )</maml:para><maml:para>Caveats:</maml:para><maml:para>* 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.</maml:para><maml:para>* 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.</maml:para><maml:para>* 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDiskAlignment</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer or computers.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies an alternate Windows account to use when enumerating drives on the server. May require Administrator privileges. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoSqlCheck</maml:name><maml:description><maml:para>If this switch is enabled, the disk(s) will not be checked for SQL Server data or log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target computer or computers.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies an alternate Windows account to use when enumerating drives on the server. May require Administrator privileges. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoSqlCheck</maml:name><maml:description><maml:para>If this switch is enabled, the disk(s) will not be checked for SQL Server data or log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Disk, OS Author: Constantine Kokkinos (@mobileck), constantinekokkinos.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT The preferred way to determine if your disks are aligned (or not) is to calculate: 1. Partition offset - stripe unit size 2. Stripe unit size - File allocation unit size References: - Disk Partition Alignment Best Practices for SQL Server - https://technet.microsoft.com/en-us/library/dd758814(v=sql.100).aspx - Getting Partition Offset information with Powershell - http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/03/01/getting-partition-Offset-information-with-powershell.aspx Thanks to Jonathan Kehayias! - Decree: Set your partition Offset and block Size and make SQL Server faster - http://www.midnightdba.com/Jen/2014/04/decree-set-your-partition-Offset-and-block-Size-make-sql-server-faster/ Thanks to Jen McCown! - Disk Performance Hands On - http://www.kendalvandyke.com/2009/02/disk-performance-hands-on-series-recap.html Thanks to Kendal Van Dyke! - Get WMI Disk Information - http://powershell.com/cs/media/p/7937.aspx Thanks to jbruns2010! </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskAlignment -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Tests the disk alignment of a single server named sqlserver2014a </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskAlignment -ComputerName sqlserver2014a, sqlserver2014b, sqlserver2014c </dev:code><dev:remarks><maml:para> Tests the disk alignment of multiple servers </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDiskAlignment</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDiskAllocation</command:name><command:noun>DbaDiskAllocation</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks all disks on a computer to see if they are formatted with allocation units of 64KB.</maml:para></maml:description></command:details><maml:description><maml:para>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's name and an IsBestPractice field are returned.</maml:para><maml:para>References:</maml:para><maml:para>https://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."</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDiskAllocation</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check disk configuration on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoSqlCheck</maml:name><maml:description><maml:para>If this switch is enabled, the disk(s) will not be checked for SQL Server data or log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies an alternate Windows account to use when enumerating drives on the server. May require Administrator privileges. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check disk configuration on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies an alternate Windows account to use when enumerating drives on the server. May require Administrator privileges. To use: $cred = Get-Credential, then pass $cred object to the -Credential parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoSqlCheck</maml:name><maml:description><maml:para>If this switch is enabled, the disk(s) will not be checked for SQL Server data or log files.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue><command:returnValue><dev:type><maml:name>System.Boolean</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Disk, OS Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskAllocation -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Scans all disks on server sqlserver2014a for best practice allocation unit size. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskAllocation -ComputerName sqlserver2014 | Select-Output * </dev:code><dev:remarks><maml:para> Scans all disks on server sqlserver2014a for allocation unit size and returns detailed results for each. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskAllocation -ComputerName sqlserver2014a -NoSqlCheck </dev:code><dev:remarks><maml:para> Scans all disks not hosting SQL Server data or log files on server sqlserver2014a for best practice allocation unit size. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDiskAllocation</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaDiskSpeed</command:name><command:noun>DbaDiskSpeed</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Obtains I/O statistics based on the DMV sys.dm_io_virtual_file_stats</maml:para></maml:description></command:details><maml:description><maml:para>Obtains I/O statistics based on the DMV sys.dm_io_virtual_file_stats:</maml:para><maml:para>https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-io-virtual-file-stats-transact-sql</maml:para><maml:para>This command uses a query from Rich Benner</maml:para><maml:para>https://github.com/RichBenner/PersonalCode/blob/master/Disk_Speed_Check.sql</maml:para><maml:para>...and also based on further adaptations referenced at https://github.com/dataplat/dbatools/issues/6551#issue-623216718</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaDiskSpeed</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AggregateBy</maml:name><maml:description><maml:para>Specify the level of aggregation for the statistics. The available options are 'File' (the default), 'Database', and 'Disk'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AggregateBy</maml:name><maml:description><maml:para>Specify the level of aggregation for the statistics. The available options are 'File' (the default), 'Database', and 'Disk'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Diagnostic, Performance Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskSpeed -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Tests how disks are performing on sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskSpeed -SqlInstance sql2008 -Database tempdb </dev:code><dev:remarks><maml:para> Tests how disks storing tempdb files on sql2008 are performing. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskSpeed -SqlInstance sql2008 -AggregateBy "File" -Database tempdb </dev:code><dev:remarks><maml:para> Returns the statistics aggregated to the file level. This is the default aggregation level if the -AggregateBy param is omitted. The -Database or -ExcludeDatabase params can be used to filter for specific databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskSpeed -SqlInstance sql2008 -AggregateBy "Database" </dev:code><dev:remarks><maml:para> Returns the statistics aggregated to the database/disk level. The -Database or -ExcludeDatabase params can be used to filter for specific databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaDiskSpeed -SqlInstance sql2008 -AggregateBy "Disk" </dev:code><dev:remarks><maml:para> Returns the statistics aggregated to the disk level. The -Database or -ExcludeDatabase params can be used to filter for specific databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $results = @(instance1, instance2) | Test-DbaDiskSpeed </dev:code><dev:remarks><maml:para> Returns the statistics for instance1 and instance2 as part of a pipeline command </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $databases = @('master', 'model') </dev:code><dev:remarks><maml:para> $results = Test-DbaDiskSpeed -SqlInstance sql2019 -Database $databases Returns the statistics for more than one database specified. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $excludedDatabases = @('master', 'model') </dev:code><dev:remarks><maml:para> $results = Test-DbaDiskSpeed -SqlInstance sql2019 -ExcludeDatabase $excludedDatabases Returns the statistics for databases other than the exclusions specified. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaDiskSpeed</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaEndpoint</command:name><command:noun>DbaEndpoint</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Performs a simple connectivity test for TCP and SSL enabled endpoints.</maml:para></maml:description></command:details><maml:description><maml:para>Performs a simple connectivity test for TCP and SSL enabled endpoints. Tests if port is accessible, not if endpoint is working.</maml:para><maml:para>Note that if an endpoint does not have a tcp listener port, it will be skipped.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaEndpoint</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Test only specific endpoint or endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaEndpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Endpoint</maml:name><maml:description><maml:para>Test only specific endpoint or endpoints.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaEndpoint.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Endpoint[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Endpoint[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Endpoint Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaEndpoint -SqlInstance localhost </dev:code><dev:remarks><maml:para> Tests all endpoints on the local default SQL Server instance. Note that if an endpoint does not have a tcp listener port, it will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror | Test-DbaEndpoint </dev:code><dev:remarks><maml:para> Tests all endpoints named Mirroring on sql2016 and localhost. Note that if an endpoint does not have a tcp listener port, it will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaEndpoint -SqlInstance localhost, sql2016 -Endpoint Mirror </dev:code><dev:remarks><maml:para> Tests all endpoints named Mirroring on sql2016 and localhost. Note that if an endpoint does not have a tcp listener port, it will be skipped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaEndpoint -SqlInstance localhost -Verbose </dev:code><dev:remarks><maml:para> Tests all endpoints on the local default SQL Server instance. See all endpoints that were skipped due to not having a tcp listener port. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaEndpoint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaIdentityUsage</command:name><command:noun>DbaIdentityUsage</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Displays information relating to IDENTITY seed usage. Works on SQL Server 2008 and above.</maml:para></maml:description></command:details><maml:description><maml:para>IDENTITY seeds have max values based off of their data type. This module will locate identity columns and report the seed usage.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaIdentityUsage</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Allows you to specify a minimum % of the seed range being utilized. This can be used to ignore seeds that have only utilized a small fraction of the range.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude - this list is auto-populated from the server</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSystem</maml:name><maml:description><maml:para>Allows you to suppress output on system databases</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Threshold</maml:name><maml:description><maml:para>Allows you to specify a minimum % of the seed range being utilized. This can be used to ignore seeds that have only utilized a small fraction of the range.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Identity, Table, Column Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaIdentityUsage -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Check identity seeds for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaIdentityUsage -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Check identity seeds on server sql2008 for only the TestDB database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaIdentityUsage -SqlInstance sql2008 -Database TestDB -Threshold 20 </dev:code><dev:remarks><maml:para> Check identity seeds on server sql2008 for only the TestDB database, limiting results to 20% utilization of seed range or higher </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaIdentityUsage</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaInstanceName</command:name><command:noun>DbaInstanceName</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests to see if it's possible to easily rename the server at the SQL Server instance level, or if it even needs to be changed.</maml:para></maml:description></command:details><maml:description><maml:para>When a SQL Server's host OS is renamed, the SQL Server should be as well. This helps with Availability Groups and Kerberos.</maml:para><maml:para>This command helps determine if your OS and SQL Server names match, and whether a rename is required.</maml:para><maml:para>It then checks conditions that would prevent a rename, such as database mirroring and replication.</maml:para><maml:para>https://www.mssqltips.com/sqlservertip/2525/steps-to-change-the-server-name-for-a-sql-server-machine/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaInstanceName</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSsrs</maml:name><maml:description><maml:para>If this switch is enabled, checking for SQL Server Reporting Services will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeSsrs</maml:name><maml:description><maml:para>If this switch is enabled, checking for SQL Server Reporting Services will be skipped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN, Instance, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaInstanceName -SqlInstance sqlserver2014a </dev:code><dev:remarks><maml:para> Returns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaInstanceName -SqlInstance sqlserver2014a, sql2016 </dev:code><dev:remarks><maml:para> Returns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaInstanceName -SqlInstance sqlserver2014a, sql2016 -ExcludeSsrs </dev:code><dev:remarks><maml:para> Returns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016, but skips validating if SSRS is installed on both instances. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaInstanceName -SqlInstance sqlserver2014a, sql2016 | Select-Object * </dev:code><dev:remarks><maml:para> Returns ServerInstanceName, SqlServerName, IsEqual and RenameRequired for sqlserver2014a and sql2016. If a Rename is required, it will also show Updatable, and Reasons if the server name is not updatable. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaInstanceName</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaLastBackup</command:name><command:noun>DbaLastBackup</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Quickly and easily tests the last set of full backups for a server.</maml:para></maml:description></command:details><maml:description><maml:para>Restores all or some of the latest backups and performs a DBCC CHECKDB.</maml:para><maml:para>1. Gathers information about the last full backups</maml:para><maml:para>2. Restores the backups to the Destination with a new name. If no Destination is specified, the originating SQL Server instance wil be used.</maml:para><maml:para>3. The database is restored as "dbatools-testrestore-$databaseName" by default, but you can change dbatools-testrestore to whatever you would like using -Prefix</maml:para><maml:para>4. The internal file names are also renamed to prevent conflicts with original database</maml:para><maml:para>5. A DBCC CHECKDB is then performed</maml:para><maml:para>6. And the test database is finally dropped</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaLastBackup</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Unlike many of the other commands, you cannot specify more than one server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database backups to test. If -Database is not provided, all database backups will be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Exclude specific Database backups to test.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>The destination server to use to test the restore. By default, the Destination will be set to the source server If a different Destination server is specified, you must ensure that the database backups are on a shared location</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataDirectory</maml:name><maml:description><maml:para>Specifies an alternative directory for mdfs, ndfs and so on. The command uses the SQL Server's default data directory for all restores.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogDirectory</maml:name><maml:description><maml:para>Specifies an alternative directory for ldfs. The command uses the SQL Server's default log directory for all restores.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="8" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamDirectory</maml:name><maml:description><maml:para>Specifies a directory for filestream data.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="9" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Prefix</maml:name><maml:description><maml:para>The database is restored as "dbatools-testrestore-$databaseName" by default. You can change dbatools-testrestore to whatever you would like using this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>If this switch is enabled, VERIFYONLY will be performed. An actual restore will not be executed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCheck</maml:name><maml:description><maml:para>If this switch is enabled, DBCC CHECKDB will be skipped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDrop</maml:name><maml:description><maml:para>If this switch is enabled, the newly-created test database will not be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyFile</maml:name><maml:description><maml:para>If this switch is enabled, the backup file will be copied to the destination default backup location unless CopyPath is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="10" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyPath</maml:name><maml:description><maml:para>Specifies a path relative to the SQL Server to copy backups when CopyFile is specified. If not specified will use destination default backup location. If destination SQL Server is not local, admin UNC paths will be utilized for the copy.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="11" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSize</maml:name><maml:description><maml:para>Max size in MB. Databases larger than this value will not be restored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="12" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceTypes. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device', in addition to custom integers for your own DeviceTypes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, copy only backups will be counted as a last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>If this switch is enabled, transaction log backups will be ignored. The restore will stop at the latest full or differential backup point.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential on the destination instance that holds the key to the azure storage account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="14" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="15" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple of 64kb and a max of 4GB Parameter is used as passtrough for Restore-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="16" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refererence: https://msdn.microsoft.com/en-us/library/ms178615.aspx#data-transfer-options Parameter is used as passtrough for Restore-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>If this switch is enabled, differential backuys will be ignored. The restore will only use Full and Log backups, so will take longer to complete</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="17" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxDop</maml:name><maml:description><maml:para>Allows you to pass in a MAXDOP setting to the DBCC CheckDB command to limit the number of parallel processes used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>By default, databases will be migrated to the destination Sql Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. The same structure on the SOURCE will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AzureCredential</maml:name><maml:description><maml:para>The name of the SQL Server credential on the destination instance that holds the key to the azure storage account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BufferCount</maml:name><maml:description><maml:para>Number of I/O buffers to use to perform the operation. Refererence: https://msdn.microsoft.com/en-us/library/ms178615.aspx#data-transfer-options Parameter is used as passtrough for Restore-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyFile</maml:name><maml:description><maml:para>If this switch is enabled, the backup file will be copied to the destination default backup location unless CopyPath is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CopyPath</maml:name><maml:description><maml:para>Specifies a path relative to the SQL Server to copy backups when CopyFile is specified. If not specified will use destination default backup location. If destination SQL Server is not local, admin UNC paths will be utilized for the copy.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database backups to test. If -Database is not provided, all database backups will be tested.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DataDirectory</maml:name><maml:description><maml:para>Specifies an alternative directory for mdfs, ndfs and so on. The command uses the SQL Server's default data directory for all restores.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>The destination server to use to test the restore. By default, the Destination will be set to the source server If a different Destination server is specified, you must ensure that the database backups are on a shared location</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DeviceType</maml:name><maml:description><maml:para>Specifies a filter for backup sets based on DeviceTypes. Valid options are 'Disk','Permanent Disk Device', 'Tape', 'Permanent Tape Device','Pipe','Permanent Pipe Device','Virtual Device', in addition to custom integers for your own DeviceTypes.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>Exclude specific Database backups to test.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FileStreamDirectory</maml:name><maml:description><maml:para>Specifies a directory for filestream data.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDiffBackup</maml:name><maml:description><maml:para>If this switch is enabled, differential backuys will be ignored. The restore will only use Full and Log backups, so will take longer to complete</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreLogBackup</maml:name><maml:description><maml:para>If this switch is enabled, transaction log backups will be ignored. The restore will stop at the latest full or differential backup point.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IncludeCopyOnly</maml:name><maml:description><maml:para>If this switch is enabled, copy only backups will be counted as a last backup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaDatabase</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Database[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Database[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LogDirectory</maml:name><maml:description><maml:para>Specifies an alternative directory for ldfs. The command uses the SQL Server's default log directory for all restores.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxDop</maml:name><maml:description><maml:para>Allows you to pass in a MAXDOP setting to the DBCC CheckDB command to limit the number of parallel processes used.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxSize</maml:name><maml:description><maml:para>Max size in MB. Databases larger than this value will not be restored.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>Parameter to set the unit of transfer. Values must be a multiple of 64kb and a max of 4GB Parameter is used as passtrough for Restore-DbaDatabase.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoCheck</maml:name><maml:description><maml:para>If this switch is enabled, DBCC CHECKDB will be skipped</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoDrop</maml:name><maml:description><maml:para>If this switch is enabled, the newly-created test database will not be dropped.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Prefix</maml:name><maml:description><maml:para>The database is restored as "dbatools-testrestore-$databaseName" by default. You can change dbatools-testrestore to whatever you would like using this parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ReuseSourceFolderStructure</maml:name><maml:description><maml:para>By default, databases will be migrated to the destination Sql Server's default data and log directories. You can override this by specifying -ReuseSourceFolderStructure. The same structure on the SOURCE will be kept exactly, so consider this if you're migrating between different versions and use part of Microsoft's default Sql structure (MSSql12.INSTANCE, etc)</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. Unlike many of the other commands, you cannot specify more than one server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VerifyOnly</maml:name><maml:description><maml:para>If this switch is enabled, VERIFYONLY will be performed. An actual restore will not be executed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: DisasterRecovery, Backup, Restore Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> Determines 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 restore will be dropped. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -Database SharePoint_Config </dev:code><dev:remarks><maml:para> Determines the last full backup for SharePoint_Config, attempts to restore it, then performs a DBCC CHECKDB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016, sql2017 | Test-DbaLastBackup </dev:code><dev:remarks><maml:para> Tests every database backup on sql2016 and sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2016, sql2017 -Database SharePoint_Config | Test-DbaLastBackup </dev:code><dev:remarks><maml:para> Tests the database backup for the SharePoint_Config database on sql2016 and sql2017 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -Database model, master -VerifyOnly </dev:code><dev:remarks><maml:para> Skips performing an action restore of the database and simply verifies the backup using VERIFYONLY option of the restore. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -NoCheck -NoDrop </dev:code><dev:remarks><maml:para> Skips the DBCC CHECKDB check. This can help speed up the tests but makes it less tested. The test restores will remain on the server. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -DataDirectory E:\bigdrive -LogDirectory L:\bigdrive -MaxSize 10240 </dev:code><dev:remarks><maml:para> Restores data and log files to alternative locations and only restores databases that are smaller than 10 GB. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2014 -Destination sql2016 -CopyFile </dev:code><dev:remarks><maml:para> Copies the backup files for sql2014 databases to sql2016 default backup locations and then attempts restore from there. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2014 -Destination sql2016 -CopyFile -CopyPath "\\BackupShare\TestRestore\" </dev:code><dev:remarks><maml:para> Copies the backup files for sql2014 databases to sql2016 default backup locations and then attempts restore from there. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -NoCheck -MaxTransferSize 4194302 -BufferCount 24 </dev:code><dev:remarks><maml:para> Determines the last full backup for ALL databases, attempts to restore all databases (with a different name and file structure). The Restore will use more memory for reading the backup files. Do not set these values to high or you can get an Out of Memory error!!! When running the restore with these additional parameters and there is other server activity it could affect server OLTP performance. Please use with causion. Prior to running, you should check memory and server resources before configure it to run automatically. More information: https://www.mssqltips.com/sqlservertip/4935/optimize-sql-server-database-restore-performance/ </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLastBackup -SqlInstance sql2016 -MaxDop 4 </dev:code><dev:remarks><maml:para> The use of the MaxDop parameter will limit the number of processors used during the DBCC command </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaLastBackup</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaLinkedServerConnection</command:name><command:noun>DbaLinkedServerConnection</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Test all linked servers from the sql servers passed</maml:para></maml:description></command:details><maml:description><maml:para>Test each linked server on the instance</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaLinkedServerConnection</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: LinkedServer Author: Thomas LaRock, thomaslarock.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLinkedServerConnection -SqlInstance DEV01 </dev:code><dev:remarks><maml:para> Test all Linked Servers for the SQL Server instance DEV01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLinkedServerConnection -SqlInstance sql2016 | Out-File C:\temp\results.txt </dev:code><dev:remarks><maml:para> Test all Linked Servers for the SQL Server instance sql2016 and output results to file </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLinkedServerConnection -SqlInstance sql2016, sql2014, sql2012 </dev:code><dev:remarks><maml:para> Test all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2016","sql2014","sql2012" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Test-DbaLinkedServerConnection -SqlCredential sqladmin Test all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012 using SQL login credentials </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers = "sql2016","sql2014","sql2012" </dev:code><dev:remarks><maml:para> PS C:\> $servers | Get-DbaLinkedServer | Test-DbaLinkedServerConnection Test all Linked Servers for the SQL Server instances sql2016, sql2014 and sql2012 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaLinkedServerConnection</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaLoginPassword</command:name><command:noun>DbaLoginPassword</command:noun><command:verb>Test</command:verb><maml:description><maml:para>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</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>By default it will test for empty password and the same password as username.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaLoginPassword</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance you're checking logins on. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using SQL Logins instead of Windows Authentication (AKA Integrated or Trusted). To use: $scred = Get-Credential, then pass $scred object to the -SqlCredential parameter. Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials. To connect as a different Windows user, run PowerShell as that user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dictionary</maml:name><maml:description><maml:para>Specifies a list of passwords to include in the test for weak passwords.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Dictionary</maml:name><maml:description><maml:para>Specifies a list of passwords to include in the test for weak passwords.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows piping from Get-DbaLogin.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Login[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Login[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>The login(s) to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Allows you to login to servers using SQL Logins instead of Windows Authentication (AKA Integrated or Trusted). To use: $scred = Get-Credential, then pass $scred object to the -SqlCredential parameter. Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials. To connect as a different Windows user, run PowerShell as that user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance you're checking logins on. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Peter Samuelsson Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLoginPassword -SqlInstance Dev01 </dev:code><dev:remarks><maml:para> Test all SQL logins that the password is null or same as username on SQL server instance Dev01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLoginPassword -SqlInstance Dev01 -Login sqladmin </dev:code><dev:remarks><maml:para> Test the 'sqladmin' SQL login that the password is null or same as username on SQL server instance Dev01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaLoginPassword -SqlInstance Dev01 -Dictionary Test1,test2 </dev:code><dev:remarks><maml:para> Test all SQL logins that the password is null, same as username or Test1,Test2 on SQL server instance Dev0 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaLogin -SqlInstance "sql2017","sql2016" | Test-DbaLoginPassword </dev:code><dev:remarks><maml:para> Test all logins on sql2017 and sql2016 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $servers | Get-DbaLogin | Out-GridView -PassThru | Test-DbaLoginPassword </dev:code><dev:remarks><maml:para> Test selected logins on all servers in the $servers variable </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaLoginPassword</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaManagementObject</command:name><command:noun>DbaManagementObject</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests to see if the SMO version specified exists on the computer.</maml:para></maml:description></command:details><maml:description><maml:para>The Test-DbaManagementObject returns True if the Version is on the computer, and False if it does not exist.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaManagementObject</maml:name><command:parameter required="false" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The name of the target you would like to check</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command uses Windows credentials. This parameter allows you to connect remotely as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VersionNumber</maml:name><maml:description><maml:para>This is the specific version number you are looking for and the return will be True.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The name of the target you would like to check</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>This command uses Windows credentials. This parameter allows you to connect remotely as a different user.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>VersionNumber</maml:name><maml:description><maml:para>This is the specific version number you are looking for and the return will be True.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Int32[]</command:parameterValue><dev:type><maml:name>System.Int32[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SMO Author: Ben Miller (@DBAduck), dbaduck.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaManagementObject -VersionNumber 13 </dev:code><dev:remarks><maml:para> Returns True if the version exists, if it does not exist it will return False </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaManagementObject</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaMaxDop</command:name><command:noun>DbaMaxDop</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Displays information relating to SQL Server Max Degree of Parallelism setting. Works on SQL Server 2005-2016.</maml:para></maml:description></command:details><maml:description><maml:para>Inspired by Sakthivel Chidambaram's post about SQL Server MAXDOP Calculator (https://blogs.msdn.microsoft.com/sqlsakthi/p/maxdop-calculator/),</maml:para><maml:para>this script displays a SQL Server's: max dop configured, and the calculated recommendation.</maml:para><maml:para>For SQL Server 2016 shows:</maml:para><maml:para>- Instance max dop configured and the calculated recommendation</maml:para><maml:para>- max dop configured per database (new feature)</maml:para><maml:para>More info:</maml:para><maml:para>https://support.microsoft.com/en-us/kb/2806535</maml:para><maml:para>https://blogs.msdn.microsoft.com/sqlsakthi/2012/05/23/wow-we-have-maxdop-calculator-for-sql-server-it-makes-my-job-easier/</maml:para><maml:para>These are just general recommendations for SQL Server and are a good starting point for setting the "max degree of parallelism" option.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaMaxDop</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Collections.ArrayList</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: MaxDop, Utility Author: Claudio Silva (@claudioessilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on SQL Servers </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMaxDop -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Get Max DOP setting for servers sql2008 and sqlserver2012 and also the recommended one. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMaxDop -SqlInstance sql2014 | Select-Object * </dev:code><dev:remarks><maml:para> Shows Max DOP setting for server sql2014 with the recommended value. Piping the output to Select-Object * will also show the 'NumaNodes' and 'NumberOfCores' of each instance </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMaxDop -SqlInstance sqlserver2016 | Select-Object * </dev:code><dev:remarks><maml:para> Get Max DOP setting for servers sql2016 with the recommended value. Piping the output to Select-Object * will also show the 'NumaNodes' and 'NumberOfCores' of each instance. Because it is an 2016 instance will be shown 'InstanceVersion', 'Database' and 'DatabaseMaxDop' columns. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaMaxDop</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaMaxMemory</command:name><command:noun>DbaMaxMemory</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Calculates the recommended value for SQL Server 'Max Server Memory' configuration setting. Works on SQL Server 2000-2014.</maml:para></maml:description></command:details><maml:description><maml:para>Inspired by Jonathan Kehayias's post about SQL Server Max memory (http://bit.ly/sqlmemcalc), this script displays a SQL Server's: total memory, currently configured SQL max memory, and the calculated recommendation.</maml:para><maml:para>Jonathan notes that the formula used provides a *general recommendation* that doesn't account for everything that may be going on in your specific environment.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaMaxMemory</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: MaxMemory, Memory Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMaxMemory -SqlInstance sqlcluster,sqlserver2012 </dev:code><dev:remarks><maml:para> Calculate the 'Max Server Memory' for SQL Server instances sqlcluster and sqlserver2012 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlcluster | Test-DbaMaxMemory </dev:code><dev:remarks><maml:para> Calculate the 'Max Server Memory' settings for all servers within the SQL Server Central Management Server "sqlcluster" </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlcluster | Test-DbaMaxMemory | Where-Object { $_.MaxValue -gt $_.Total } | Set-DbaMaxMemory </dev:code><dev:remarks><maml:para> Find 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. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaMaxMemory</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaMigrationConstraint</command:name><command:noun>DbaMigrationConstraint</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Show if you can migrate the database(s) between the servers.</maml:para></maml:description></command:details><maml:description><maml:para>When you want to migrate from a higher edition to a lower one there are some features that can't be used.</maml:para><maml:para>This function will validate if you have any of this features in use and will report to you.</maml:para><maml:para>The validation will be made ONLY on on SQL Server 2008 or higher using the 'sys.dm_db_persisted_sku_features' dmv.</maml:para><maml:para>This function only validate SQL Server 2008 versions or higher.</maml:para><maml:para>The editions supported by this function are:</maml:para><maml:para>- Enterprise</maml:para><maml:para>- Developer</maml:para><maml:para>- Evaluation</maml:para><maml:para>- Standard</maml:para><maml:para>- Express</maml:para><maml:para>Take 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/</maml:para><maml:para>The -Database parameter is auto-populated for command-line completion.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaMigrationConstraint</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. Options for this list are auto-populated from the server. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Destination</maml:name><maml:description><maml:para>Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DestinationSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeDatabase</maml:name><maml:description><maml:para>The database(s) to exclude. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Source</maml:name><maml:description><maml:para>Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SourceSqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration Author: Claudio Silva (@ClaudioESSilva) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> All databases on sqlserver2014a will be verified for features in use that can't be supported on sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster -SourceSqlCredential $cred </dev:code><dev:remarks><maml:para> All databases will be verified for features in use that can't be supported on the destination server. SQL credentials are used to authenticate against sqlserver2014a and Windows Authentication is used for sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaMigrationConstraint -Source sqlserver2014a -Destination sqlcluster -Database db1 </dev:code><dev:remarks><maml:para> Only db1 database will be verified for features in use that can't be supported on the destination server. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaMigrationConstraint</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaNetworkLatency</command:name><command:noun>DbaNetworkLatency</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests how long a query takes to return from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>By 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.</maml:para><maml:para>This allows you to see if the issue is with the connection or the SQL Server itself.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaNetworkLatency</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Specifies the query to be executed. By default, "SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES" will be executed on master. To execute in other databases, use fully qualified object names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Count</maml:name><maml:description><maml:para>Specifies how many times the query should be executed. By default, the query is executed three times.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Count</maml:name><maml:description><maml:para>Specifies how many times the query should be executed. By default, the query is executed three times.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Query</maml:name><maml:description><maml:para>Specifies the query to be executed. By default, "SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES" will be executed on master. To execute in other databases, use fully qualified object names.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:returnValues><command:returnValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /><maml:description /></dev:type></command:returnValue></command:returnValues><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Performance, Network Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaNetworkLatency -SqlInstance sqlserver2014a, sqlcluster </dev:code><dev:remarks><maml:para> Tests the round trip return of "SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES" on sqlserver2014a and sqlcluster using Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaNetworkLatency -SqlInstance sqlserver2014a -SqlCredential $cred </dev:code><dev:remarks><maml:para> Tests the execution results return of "SELECT TOP 100 * FROM INFORMATION_SCHEMA.TABLES" on sqlserver2014a using SQL credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaNetworkLatency -SqlInstance sqlserver2014a, sqlcluster, sqlserver -Query "select top 10 * from otherdb.dbo.table" -Count 10 </dev:code><dev:remarks><maml:para> Tests the execution results return of "select top 10 * from otherdb.dbo.table" 10 times on sqlserver2014a, sqlcluster, and sqlserver using Windows credentials. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaNetworkLatency</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaOptimizeForAdHoc</command:name><command:noun>DbaOptimizeForAdHoc</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Displays information relating to SQL Server Optimize for AdHoc Workloads setting. Works on SQL Server 2008-2016.</maml:para></maml:description></command:details><maml:description><maml:para>When this option is set, plan cache size is further reduced for single-use ad hoc OLTP workload.</maml:para><maml:para>More info: https://msdn.microsoft.com/en-us/library/cc645587.aspx</maml:para><maml:para>http://www.sqlservercentral.com/blogs/glennberry/2011/02/25/some-suggested-sql-server-2008-r2-instance-configuration-settings/</maml:para><maml:para>These are just general recommendations for SQL Server and are a good starting point for setting the "optimize for ad-hoc workloads" option.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaOptimizeForAdHoc</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>A collection of one or more SQL Server instance names to query.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>A collection of one or more SQL Server instance names to query.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Configure, SPConfigure Author: Brandon Abshire, netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaOptimizeForAdHoc -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Validates whether Optimize for AdHoc Workloads setting is enabled for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaOptimizeForAdHoc</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaPath</command:name><command:noun>DbaPath</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Tests if file or directory exists from the perspective of the SQL Server service account.</maml:para></maml:description></command:details><maml:description><maml:para>Uses master.dbo.xp_fileexist to determine if a file or directory exists.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaPath</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path to test. This can be a file or directory</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>The Path to test. This can be a file or directory</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server you want to run the test on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Storage, Path, Directory Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaPath -SqlInstance sqlcluster -Path L:\MSAS12.MSSQLSERVER\OLAP </dev:code><dev:remarks><maml:para> Tests whether the service account running the "sqlcluster" SQL Server instance can access L:\MSAS12.MSSQLSERVER\OLAP. Logs into sqlcluster using Windows credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $credential = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\> Test-DbaPath -SqlInstance sqlcluster -SqlCredential $credential -Path L:\MSAS12.MSSQLSERVER\OLAP Tests whether the service account running the "sqlcluster" SQL Server instance can access L:\MSAS12.MSSQLSERVER\OLAP. Logs into sqlcluster using SQL authentication. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaPath</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaPowerPlan</command:name><command:noun>DbaPowerPlan</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Checks the Power Plan settings for compliance with best practices, which recommend High Performance for SQL Server.</maml:para></maml:description></command:details><maml:description><maml:para>Checks the Power Plan settings on a computer against best practices recommendations.</maml:para><maml:para>Each server's name, the active and the recommended Power Plan and an IsBestPractice field are returned.</maml:para><maml:para>If your organization uses a different Power Plan that is considered best practice, specify -PowerPlan.</maml:para><maml:para>References:</maml:para><maml:para>https://support.microsoft.com/en-us/kb/2207548</maml:para><maml:para>http://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaPowerPlan</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check Power Plan settings on.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="True (ByPropertyName)" aliases="" variableLength="true" globbing="false"><maml:name>PowerPlan</maml:name><maml:description><maml:para>If your organization uses a different power plan that's considered best practice, specify it here.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The server(s) to check Power Plan settings on.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PowerPlan</maml:name><maml:description><maml:para>If your organization uses a different power plan that's considered best practice, specify it here.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PowerPlan, OS, Utility Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaPowerPlan -ComputerName sqlserver2014a </dev:code><dev:remarks><maml:para> Checks the Power Plan settings for sqlserver2014a and indicates whether or not it complies with best practices. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaPowerPlan -ComputerName sqlserver2014a -PowerPlan 'Maximum Performance' </dev:code><dev:remarks><maml:para> Checks the Power Plan settings for sqlserver2014a and indicates whether or not it is set to the Power Plan "Maximum Performance". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> 'newserver1', 'newserver2' | Test-DbaPowerPlan </dev:code><dev:remarks><maml:para> Checks the Power Plan settings for newserver1 and newserver2 and indicates whether or not they comply with best practices. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaPowerPlan -ComputerName oldserver | Test-DbaPowerPlan -ComputerName newserver1, newserver2 </dev:code><dev:remarks><maml:para> Uses the Power Plan of oldserver as best practice and tests the Power Plan of newserver1 and newserver2 against that. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaPowerPlan</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaRepLatency</command:name><command:noun>DbaRepLatency</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Displays replication latency for all transactional publications for a server or database.</maml:para></maml:description></command:details><maml:description><maml:para>Creates tracer tokens to determine latency between the publisher/distributor and the distributor/subscriber</maml:para><maml:para>for all transactional publications for a server, database, or publication.</maml:para><maml:para>All replication commands need SQL Server Management Studio installed and are therefore currently not supported.</maml:para><maml:para>Have a look at this issue to get more information: https://github.com/dataplat/dbatools/issues/7428</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaRepLatency</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublicationName</maml:name><maml:description><maml:para>The publication(s) to process. If unspecified, all publications will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeToLive</maml:name><maml:description><maml:para>How long, in seconds, to wait for a tracer token to complete its journey from the publisher to the subscriber. If unspecified, all tracer tokens will take as long as they need to process results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetainToken</maml:name><maml:description><maml:para>Retains the tracer tokens created for each publication. If unspecified, all tracer tokens created will be discarded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayTokenHistory</maml:name><maml:description><maml:para>Displays all tracer tokens in each publication. If unspecified, the current tracer token created will be only token displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database(s) to process. If unspecified, all databases will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>DisplayTokenHistory</maml:name><maml:description><maml:para>Displays all tracer tokens in each publication. If unspecified, the current tracer token created will be only token displayed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PublicationName</maml:name><maml:description><maml:para>The publication(s) to process. If unspecified, all publications will be processed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>RetainToken</maml:name><maml:description><maml:para>Retains the tracer tokens created for each publication. If unspecified, all tracer tokens created will be discarded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TimeToLive</maml:name><maml:description><maml:para>How long, in seconds, to wait for a tracer token to complete its journey from the publisher to the subscriber. If unspecified, all tracer tokens will take as long as they need to process results.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Replication Author: Colin Douglas Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaRepLatency -SqlInstance sql2008, sqlserver2012 </dev:code><dev:remarks><maml:para> Return replication latency for all transactional publications for servers sql2008 and sqlserver2012. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaRepLatency -SqlInstance sql2008 -Database TestDB </dev:code><dev:remarks><maml:para> Return replication latency for all transactional publications on server sql2008 for only the TestDB database </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaRepLatency -SqlInstance sql2008 -Database TestDB -PublicationName TestDB_Pub </dev:code><dev:remarks><maml:para> Return replication latency for the TestDB_Pub publication for the TestDB database located on the server sql2008. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaRepLatency</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaSpn</command:name><command:noun>DbaSpn</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Test-DbaSpn will determine what SPNs *should* be set for a given server (and any instances of SQL running on it) and return whether the SPNs are set or not.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para><maml:para>- For any instances with TCP/IP enabled, the script will determine which port(s) the instances are listening on and generate the required SPNs.</maml:para><maml:para>- For named instances NOT using dynamic ports, the script will generate a port-based SPN for those instances as well.</maml:para><maml:para>- At a minimum, the script will test a base, port-less SPN for each instance discovered.</maml:para><maml:para>Once 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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaSpn</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer you want to discover any SQL Server instances on. This parameter is required.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to the remote server and active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The computer you want to discover any SQL Server instances on. This parameter is required.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>The credential you want to use to connect to the remote server and active directory.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: SPN Author: Drew Furgiuele (@pittfurg), port1433.com | niphlod Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName SQLSERVERA -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Connects to a computer (SQLSERVERA) and queries WMI for all SQL instances and return "required" SPNs. It will then take each SPN it generates and query Active Directory to make sure the SPNs are set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName SQLSERVERA,SQLSERVERB -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Connects to multiple computers (SQLSERVERA, SQLSERVERB) and queries WMI for all SQL instances and return "required" SPNs. It will then take each SPN it generates and query Active Directory to make sure the SPNs are set. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaSpn -ComputerName SQLSERVERC -Credential ad\sqldba </dev:code><dev:remarks><maml:para> Connects to a computer (SQLSERVERC) on a specified and queries WMI for all SQL instances and return "required" SPNs. It 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 </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaSpn</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaTempDbConfig</command:name><command:noun>DbaTempDbConfig</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Evaluates tempdb against several rules to match best practices.</maml:para></maml:description></command:details><maml:description><maml:para>Evaluates tempdb against a set of rules to match best practices. The rules are:</maml:para><maml:para>* TF 1118 enabled - Is Trace Flag 1118 enabled (See KB328551).</maml:para><maml:para>* File Count - Does the count of data files in tempdb match the number of logical cores, up to 8?</maml:para><maml:para>* File Growth - Are any files set to have percentage growth? Best practice is all files have an explicit growth value.</maml:para><maml:para>* File Location - Is tempdb located on the C:\? Best practice says to locate it elsewhere.</maml:para><maml:para>* File MaxSize Set (optional) - Do any files have a max size value? Max size could cause tempdb problems if it isn't allowed to grow.</maml:para><maml:para>* Data File Size Equal - Are the sizes of all the tempdb data files the same?</maml:para><maml:para>Other rules can be added at a future date.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaTempDbConfig</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2005 and higher are supported.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. SQL Server 2005 and higher are supported.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Tempdb, Configuration Author: Michael Fal (@Mike_Fal), mikefal.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Based on Amit Bannerjee's (@banerjeeamit) Get-TempDB function (https://github.com/amitmsft/SqlOnAzureVM/blob/master/Get-TempdbFiles.ps1) </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaTempDbConfig -SqlInstance localhost </dev:code><dev:remarks><maml:para> Checks tempdb on the localhost machine. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaTempDbConfig -SqlInstance localhost | Select-Object * </dev:code><dev:remarks><maml:para> Checks tempdb on the localhost machine. All rest results are shown. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a | Test-DbaTempDbConfig | Select-Object * | Out-GridView </dev:code><dev:remarks><maml:para> Checks tempdb configuration for a group of servers from SQL Server Central Management Server (CMS). Output includes all columns. Send output to GridView. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaTempDbConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Test-DbaWindowsLogin</command:name><command:noun>DbaWindowsLogin</command:noun><command:verb>Test</command:verb><maml:description><maml:para>Test-DbaWindowsLogin finds any logins on SQL instance that are AD logins with either disabled AD user accounts or ones that no longer exist</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-DbaWindowsLogin</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance you're checking logins on. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies a list of logins to include in the results. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>Specifies a list of logins to exclude from the results. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterBy</maml:name><maml:description><maml:para>Specifies the object types to return. By default, both Logins and Groups are returned. Valid options for this parameter are 'GroupsOnly' and 'LoginsOnly'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDomains</maml:name><maml:description><maml:para>Specifies a list of Active Directory domains to ignore. By default, all domains in the forest as well as all trusted domains are traversed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExcludeLogin</maml:name><maml:description><maml:para>Specifies a list of logins to exclude from the results. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FilterBy</maml:name><maml:description><maml:para>Specifies the object types to return. By default, both Logins and Groups are returned. Valid options for this parameter are 'GroupsOnly' and 'LoginsOnly'.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IgnoreDomains</maml:name><maml:description><maml:para>Specifies a list of Active Directory domains to ignore. By default, all domains in the forest as well as all trusted domains are traversed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Login</maml:name><maml:description><maml:para>Specifies a list of logins to include in the results. Options for this list are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server instance you're checking logins on. You must have sysadmin access and server version must be SQL Server version 2000 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Stephen Bennett, sqlnotesfromtheunderground.wordpress.com | Chrissy LeMaire (@cl) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaWindowsLogin -SqlInstance Dev01 </dev:code><dev:remarks><maml:para> Tests all logins in the current Active Directory domain that are either disabled or do not exist on the SQL Server instance Dev01 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaWindowsLogin -SqlInstance Dev01 -FilterBy GroupsOnly | Select-Object -Property * </dev:code><dev:remarks><maml:para> Tests all Active Directory groups that have logins on Dev01, and shows all information for those logins </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Test-DbaWindowsLogin -SqlInstance Dev01 -IgnoreDomains testdomain </dev:code><dev:remarks><maml:para> Tests all Domain logins excluding any that are from the testdomain </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Test-DbaWindowsLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Uninstall-DbaSqlWatch</command:name><command:noun>DbaSqlWatch</command:noun><command:verb>Uninstall</command:verb><maml:description><maml:para>Uninstalls SqlWatch.</maml:para></maml:description></command:details><maml:description><maml:para>Deletes all user objects, agent jobs, and historical data associated with SqlWatch.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Uninstall-DbaSqlWatch</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install SqlWatch into. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>Specifies the database to install SqlWatch into. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>SQL Server name or SMO object representing the SQL Server to connect to.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, SqlWatch Author: Ken K (github.com/koglerk) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://sqlwatch.io </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Uninstall-DbaSqlWatch -SqlInstance server1 </dev:code><dev:remarks><maml:para> Deletes all user objects, agent jobs, and historical data associated with SqlWatch from the master database. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Uninstall-DbaSqlWatch</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Uninstall-DbatoolsWatchUpdate</command:name><command:noun>DbatoolsWatchUpdate</command:noun><command:verb>Uninstall</command:verb><maml:description><maml:para>Removes the scheduled task created for Watch-DbaUpdate by Install-DbatoolsWatchUpdate so that notifications no longer pop up.</maml:para></maml:description></command:details><maml:description><maml:para>Removes the scheduled task created for Watch-DbaUpdate by Install-DbatoolsWatchUpdate so that notifications no longer pop up.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Uninstall-DbatoolsWatchUpdate</maml:name></command:syntaxItem></command:syntax><command:parameters></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Watcher Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Uninstall-DbatoolsWatchUpdate </dev:code><dev:remarks><maml:para> Removes the scheduled task created by Install-DbatoolsWatchUpdate. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Uninstall-DbatoolsWatchUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Unregister-DbatoolsConfig</command:name><command:noun>DbatoolsConfig</command:noun><command:verb>Unregister</command:verb><maml:description><maml:para>Removes registered configuration settings.</maml:para></maml:description></command:details><maml:description><maml:para>Removes registered configuration settings.</maml:para><maml:para>This function can be used to remove settings that have been persisted for either user or computer.</maml:para><maml:para>Note: This command has no effect on configuration settings currently in memory.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Unregister-DbatoolsConfig</maml:name><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationItem</maml:name><maml:description><maml:para>A configuration object as returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the configuration setting to purge.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Settings can be set to either default or enforced, for user or the entire computer. By default, only DefaultSettings for the user are unregistered. Use this parameter to choose the actual scope for the command to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Unregister-DbatoolsConfig</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The module, amongst which settings should be unregistered.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the setting to unregister. For use together with the module parameter, to limit the amount of settings that are unregistered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Settings can be set to either default or enforced, for user or the entire computer. By default, only DefaultSettings for the user are unregistered. Use this parameter to choose the actual scope for the command to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConfigurationItem</maml:name><maml:description><maml:para>A configuration object as returned by Get-DbatoolsConfig.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.Config[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.Config[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FullName</maml:name><maml:description><maml:para>The full name of the configuration setting to purge.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Module</maml:name><maml:description><maml:para>The module, amongst which settings should be unregistered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Name</maml:name><maml:description><maml:para>The name of the setting to unregister. For use together with the module parameter, to limit the amount of settings that are unregistered.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Scope</maml:name><maml:description><maml:para>Settings can be set to either default or enforced, for user or the entire computer. By default, only DefaultSettings for the user are unregistered. Use this parameter to choose the actual scope for the command to process.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Configuration.ConfigScope</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Configuration.ConfigScope</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbatoolsConfig | Unregister-DbatoolsConfig </dev:code><dev:remarks><maml:para> Completely removes all registered configurations currently loaded in memory. In most cases, this will mean removing all registered configurations. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Unregister-DbatoolsConfig -Scope SystemDefault -FullName 'MyModule.Path.DefaultExport' </dev:code><dev:remarks><maml:para> Unregisters the setting 'MyModule.Path.DefaultExport' from the list of computer-wide defaults. Note: Changing system wide settings requires running the console with elevation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Unregister-DbatoolsConfig -Module MyModule </dev:code><dev:remarks><maml:para> Unregisters all configuration settings for the module MyModule. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Unregister-DbatoolsConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Update-DbaBuildReference</command:name><command:noun>DbaBuildReference</command:noun><command:verb>Update</command:verb><maml:description><maml:para>Updates the local reference looking online for the most up to date.</maml:para></maml:description></command:details><maml:description><maml:para>This function updates the local json files containing all the infos about SQL builds.</maml:para><maml:para>It uses the setting 'assets.sqlbuildreference' to fetch it.</maml:para><maml:para>To see your current setting, use Get-DbatoolsConfigValue -Name 'assets.sqlbuildreference'</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Update-DbaBuildReference</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from instead of downloading from Github.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install from instead of downloading from Github.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Utility, SqlBuild Author: Simone Bizzotto (@niphold) | Friedrich Weinmann (@FredWeinmann) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaBuildReference </dev:code><dev:remarks><maml:para> Looks online if there is a newer version of the build reference </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaBuildReference -LocalFile \\fileserver\Software\dbatools\dbatools-buildref-index.json </dev:code><dev:remarks><maml:para> Uses the given file instead of downloading the file to update the build reference </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Update-DbaBuildReference</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Update-DbaInstance</command:name><command:noun>DbaInstance</command:noun><command:verb>Update</command:verb><maml:description><maml:para>Invokes installation of SQL Server Service Packs and Cumulative Updates on local and remote servers.</maml:para></maml:description></command:details><maml:description><maml:para>Starts an automated process of updating SQL Server installation to a specific version defined in the parameters.</maml:para><maml:para>The command will:</maml:para><maml:para>* Search for SQL Server installations in a remote registry</maml:para><maml:para>* Check if current settings are applicable to the current SQL Server versions</maml:para><maml:para>* Search for a KB executable in a folder specified in -Path</maml:para><maml:para>* Establish a PSRemote connection to the target machine if necessary</maml:para><maml:para>* Extract KB to a temporary folder in a current user's profile</maml:para><maml:para>* Run the installation from the temporary folder updating all instances on the computer at once</maml:para><maml:para>* Remove temporary files</maml:para><maml:para>* Restart the computer (if -Restart is specified)</maml:para><maml:para>* Repeat for each consequent KB and computer</maml:para><maml:para>The impact of this function is set to High, if you don't want to receive interactive prompts, set -Confirm to $false.</maml:para><maml:para>When using CredSSP authentication, this function will try to configure CredSSP authentication for PowerShell Remoting sessions.</maml:para><maml:para>If this is not desired (e.g.: CredSSP authentication is managed externally, or is already configured appropriately,)</maml:para><maml:para>it can be disabled by setting the dbatools configuration option 'commands.initialize-credssp.bypass' value to $true.</maml:para><maml:para>To be able to configure CredSSP, the command needs to be run in an elevated PowerShell session.</maml:para><maml:para>Always backup databases and configurations prior to upgrade.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Update-DbaInstance</maml:name><command:parameter required="false" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if update Repository is located on a network folder. Authentication will default to CredSSP if -Credential is used. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>A target version of the installation you want to reach. If not specified, a latest available version would be used by default. Can be defined using the following general pattern: <MajorVersion><SPX><CUX>. Any part of the pattern can be omitted if needed: 2008R2SP1 - will update SQL 2008R2 to SP1 2016CU3 - will update SQL 2016 to CU3 of current Service Pack installed SP0CU3 - will update all existing SQL Server versions to RTM CU3 without installing any service packs SP1CU7 - will update all existing SQL Server versions to SP1 and then (after restart if -Restart is specified) to SP1CU7 CU7 - will update all existing SQL Server versions to CU7 of current Service Pack installed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Type of the update: All | ServicePack | CumulativeUpdate. Default: All Use -Version to limit upgrade to a certain Major version of SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only updates a specific instance(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the folder(s) with SQL Server patches downloaded. It will be scanned recursively for available patches. Path should be available from both server with SQL Server installation and client that runs the command. All file names should match the pattern used by Microsoft: SQLServer####*-KB###-*x##*.exe If a file is missing in the repository, the installation will fail. Consider setting the following configuration if you want to omit this parameter: `Set-DbatoolsConfig -Name Path.SQLServerUpdates -Value '\\path\to\updates'`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of a patch and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 patch on a computer, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Continues a failed installation attempt when specified. Will abort a previously failed installation otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Throttle</maml:name><maml:description><maml:para>Maximum number of computers updated in parallel. Once reached, the update operations will queue up. Default: 50</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. Allowed values: 'Default', 'Basic', 'Negotiate', 'NegotiateWithImplicitCredential', 'Credssp', 'Digest', 'Kerberos'. If the protocol fails to establish a connection and explicit -Credentials were used, a failback authentication method would be attempted that configures PSSessionConfiguration on the remote machine. This method, however, is considered insecure and would, therefore, prompt an additional confirmation when used. Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtractPath</maml:name><maml:description><maml:para>Lets you specify a location to extract the update file to on the system requiring the update. e.g. C:\temp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>A list of extra arguments to pass to the execution file. Accepts one or more strings containing command line parameters. Example: ... -ArgumentList "/SkipRules=RebootRequiredCheck", "/Q"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Download</maml:name><maml:description><maml:para>Download missing KBs to the first folder specified in the -Path parameter. Files would be first downloaded to the local machine (TEMP folder), and then distributed onto remote machines if needed. If the Path is a network Path, the files would be downloaded straight to the network folder and executed from there.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Update-DbaInstance</maml:name><command:parameter required="false" position="1" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if update Repository is located on a network folder. Authentication will default to CredSSP if -Credential is used. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KB</maml:name><maml:description><maml:para>Install a specific update or list of updates. Can be a number of a string KBXXXXXXX.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only updates a specific instance(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the folder(s) with SQL Server patches downloaded. It will be scanned recursively for available patches. Path should be available from both server with SQL Server installation and client that runs the command. All file names should match the pattern used by Microsoft: SQLServer####*-KB###-*x##*.exe If a file is missing in the repository, the installation will fail. Consider setting the following configuration if you want to omit this parameter: `Set-DbatoolsConfig -Name Path.SQLServerUpdates -Value '\\path\to\updates'`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of a patch and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 patch on a computer, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Continues a failed installation attempt when specified. Will abort a previously failed installation otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Throttle</maml:name><maml:description><maml:para>Maximum number of computers updated in parallel. Once reached, the update operations will queue up. Default: 50</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. Allowed values: 'Default', 'Basic', 'Negotiate', 'NegotiateWithImplicitCredential', 'Credssp', 'Digest', 'Kerberos'. If the protocol fails to establish a connection and explicit -Credentials were used, a failback authentication method would be attempted that configures PSSessionConfiguration on the remote machine. This method, however, is considered insecure and would, therefore, prompt an additional confirmation when used. Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtractPath</maml:name><maml:description><maml:para>Lets you specify a location to extract the update file to on the system requiring the update. e.g. C:\temp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>A list of extra arguments to pass to the execution file. Accepts one or more strings containing command line parameters. Example: ... -ArgumentList "/SkipRules=RebootRequiredCheck", "/Q"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Download</maml:name><maml:description><maml:para>Download missing KBs to the first folder specified in the -Path parameter. Files would be first downloaded to the local machine (TEMP folder), and then distributed onto remote machines if needed. If the Path is a network Path, the files would be downloaded straight to the network folder and executed from there.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ArgumentList</maml:name><maml:description><maml:para>A list of extra arguments to pass to the execution file. Accepts one or more strings containing command line parameters. Example: ... -ArgumentList "/SkipRules=RebootRequiredCheck", "/Q"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Authentication</maml:name><maml:description><maml:para>Chooses an authentication protocol for remote connections. Allowed values: 'Default', 'Basic', 'Negotiate', 'NegotiateWithImplicitCredential', 'Credssp', 'Digest', 'Kerberos'. If the protocol fails to establish a connection and explicit -Credentials were used, a failback authentication method would be attempted that configures PSSessionConfiguration on the remote machine. This method, however, is considered insecure and would, therefore, prompt an additional confirmation when used. Defaults: * CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue. * Default when -Credential is not specified. Will likely fail if a network path is specified. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>Target computer with SQL instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Continue</maml:name><maml:description><maml:para>Continues a failed installation attempt when specified. Will abort a previously failed installation otherwise.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the remote server. Must be specified for any remote connection if update Repository is located on a network folder. Authentication will default to CredSSP if -Credential is used. For CredSSP see also additional information in DESCRIPTION.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Download</maml:name><maml:description><maml:para>Download missing KBs to the first folder specified in the -Path parameter. Files would be first downloaded to the local machine (TEMP folder), and then distributed onto remote machines if needed. If the Path is a network Path, the files would be downloaded straight to the network folder and executed from there.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ExtractPath</maml:name><maml:description><maml:para>Lets you specify a location to extract the update file to on the system requiring the update. e.g. C:\temp</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InstanceName</maml:name><maml:description><maml:para>Only updates a specific instance(s).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KB</maml:name><maml:description><maml:para>Install a specific update or list of updates. Can be a number of a string KBXXXXXXX.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoPendingRenameCheck</maml:name><maml:description><maml:para>Disables pending rename validation when checking for a pending reboot.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Path</maml:name><maml:description><maml:para>Path to the folder(s) with SQL Server patches downloaded. It will be scanned recursively for available patches. Path should be available from both server with SQL Server installation and client that runs the command. All file names should match the pattern used by Microsoft: SQLServer####*-KB###-*x##*.exe If a file is missing in the repository, the installation will fail. Consider setting the following configuration if you want to omit this parameter: `Set-DbatoolsConfig -Name Path.SQLServerUpdates -Value '\\path\to\updates'`</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Restart</maml:name><maml:description><maml:para>Restart computer automatically after a successful installation of a patch and wait until it comes back online. Using this parameter is the only way to chain-install more than 1 patch on a computer, since every single patch will require a restart of said computer.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Throttle</maml:name><maml:description><maml:para>Maximum number of computers updated in parallel. Once reached, the update operations will queue up. Default: 50</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Type</maml:name><maml:description><maml:para>Type of the update: All | ServicePack | CumulativeUpdate. Default: All Use -Version to limit upgrade to a certain Major version of SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Version</maml:name><maml:description><maml:para>A target version of the installation you want to reach. If not specified, a latest available version would be used by default. Can be defined using the following general pattern: <MajorVersion><SPX><CUX>. Any part of the pattern can be omitted if needed: 2008R2SP1 - will update SQL 2008R2 to SP1 2016CU3 - will update SQL 2016 to CU3 of current Service Pack installed SP0CU3 - will update all existing SQL Server versions to RTM CU3 without installing any service packs SP1CU7 - will update all existing SQL Server versions to SP1 and then (after restart if -Restart is specified) to SP1CU7 CU7 - will update all existing SQL Server versions to CU7 of current Service Pack installed</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Deployment, Install, Patching, Update Author: Kirill Kravtsov (@nvarscar), nvarscar.wordpress.com Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires Local Admin rights on destination computer(s). </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName SQL1 -Version SP3 -Path \\network\share </dev:code><dev:remarks><maml:para> Updates all applicable SQL Server installations on SQL1 to SP3. Binary files for the update will be searched among all files and folders recursively in \\network\share. Prompts for confirmation before the update. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName SQL1, SQL2 -Restart -Path \\network\share -Confirm:$false </dev:code><dev:remarks><maml:para> Updates all applicable SQL Server installations on SQL1 and SQL2 with the most recent patch. It will install latest ServicePack, restart the computers, install latest Cumulative Update, and finally restart the computer once again. Binary files for the update will be searched among all files and folders recursively in \\network\share. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName SQL1 -Version 2012 -Type ServicePack -Path \\network\share </dev:code><dev:remarks><maml:para> Updates SQL Server 2012 on SQL1 with the most recent ServicePack found in your patch repository. Binary files for the update will be searched among all files and folders recursively in \\network\share. Prompts for confirmation before the update. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName SQL1 -KB 123456 -Restart -Path \\network\share -Confirm:$false </dev:code><dev:remarks><maml:para> Installs KB 123456 on SQL1 and restarts the computer. Binary files for the update will be searched among all files and folders recursively in \\network\share. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName Server1 -Version SQL2012SP3, SQL2016SP2CU3 -Path \\network\share -Restart -Confirm:$false </dev:code><dev:remarks><maml:para> Updates SQL 2012 to SP3 and SQL 2016 to SP2CU3 on Server1. Each update will be followed by a restart. Binary files for the update will be searched among all files and folders recursively in \\network\share. Does not prompt for confirmation. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName Server1 -Path \\network\share -Restart -Confirm:$false -ExtractPath "C:\temp" </dev:code><dev:remarks><maml:para> Updates all applicable SQL Server installations on Server1 with the most recent patch. Each update will be followed by a restart. Binary files for the update will be searched among all files and folders recursively in \\network\share. Does not prompt for confirmation. Extracts the files in local driver on Server1 C:\temp. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName Server1 -Path \\network\share -ArgumentList "/SkipRules=RebootRequiredCheck" </dev:code><dev:remarks><maml:para> Updates all applicable SQL Server installations on Server1 with the most recent patch. Additional command line parameters would be passed to the executable. Binary files for the update will be searched among all files and folders recursively in \\network\share. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaInstance -ComputerName SQL1 -Version CU3 -Download -Path \\network\share -Confirm:$false </dev:code><dev:remarks><maml:para> Downloads an appropriate CU KB to \\network\share and installs it onto SQL1. Does not prompt for confirmation. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Update-DbaInstance</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Update-DbaMaintenanceSolution</command:name><command:noun>DbaMaintenanceSolution</command:noun><command:verb>Update</command:verb><maml:description><maml:para>Download and Update SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com)</maml:para></maml:description></command:details><maml:description><maml:para>This script will download and update the latest version of SQL Server Maintenance Solution created by Ola Hallengren.</maml:para><maml:para>Only the stored procedure will be updated. All tables and jobs will stay untouched.</maml:para><maml:para>So this can only be used until a new version of the procedures need a new version of the tables or jobs.</maml:para><maml:para>In this case you have to completely reinstall the SQL Server Maintenance Solution with Install-DbaMaintenanceSolution.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Update-DbaMaintenanceSolution</maml:name><command:parameter required="true" position="0" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance onto which the Maintenance Solution will be updated.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where Ola Hallengren's solution is currently installed. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Solution</maml:name><maml:description><maml:para>Specifies which portion of the Maintenance solution to update. Valid values are All (full solution), Backup, IntegrityCheck and IndexOptimize. Defaults to All, but only existing procedures will be replaced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install Ola's solution from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded from https://github.com/olahallengren/sql-server-maintenance-solution</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Ola's solution will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where Ola Hallengren's solution is currently installed. Defaults to master.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Force</maml:name><maml:description><maml:para>If this switch is enabled, the Ola's solution will be downloaded from the internet even if previously cached.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install Ola's solution from. This *should* be the zip file as distributed by the maintainers. If this parameter is not specified, the latest version will be downloaded from https://github.com/olahallengren/sql-server-maintenance-solution</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Solution</maml:name><maml:description><maml:para>Specifies which portion of the Maintenance solution to update. Valid values are All (full solution), Backup, IntegrityCheck and IndexOptimize. Defaults to All, but only existing procedures will be replaced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance onto which the Maintenance Solution will be updated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Community, OlaHallengren Author: Andreas Jordan, @JordanOrdix Website: https://dbatools.io Copyright: (c) 2021 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT https://ola.hallengren.com </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA </dev:code><dev:remarks><maml:para> Updates Ola Hallengren's Solution objects on RES14224 in the DBA database. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Install-DbaMaintenanceSolution -SqlInstance RES14224 -Database DBA -Solution Backup </dev:code><dev:remarks><maml:para> This will update the stored procedure DatabaseBackup only, even if other parts of the solution are also installed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Update-DbaMaintenanceSolution</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Update-DbaServiceAccount</command:name><command:noun>DbaServiceAccount</command:noun><command:verb>Update</command:verb><maml:description><maml:para>Changes service account (or just its password) of the SQL Server service.</maml:para></maml:description></command:details><maml:description><maml:para>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.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Update-DbaServiceAccount</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceName</maml:name><maml:description><maml:para>A name of the service on which the action is performed. E.g. MSSQLSERVER or SqlAgent$INSTANCENAME</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Username</maml:name><maml:description><maml:para>Username of the service account. Cannot be used with -ServiceCredential. For local service accounts use one of the following usernames omitting the -SecurePassword parameter: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceCredential</maml:name><maml:description><maml:para>Windows Credential object under which the service will be setup to run. Cannot be used with -Username. For local service accounts use one of the following usernames with empty password: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PreviousPassword</maml:name><maml:description><maml:para>An old password of the service account. Optional when run under local admin privileges.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>New password of the service account. The function will ask for a password if not specified. MSAs and local system accounts will ignore the password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRestart</maml:name><maml:description><maml:para>Do not immediately restart the service after changing the password. **Note that the changes will not go into effect until you restart the SQL Services**</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Update-DbaServiceAccount</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services. Basically, any object that has ComputerName and ServiceName properties. Can be piped from Get-DbaService.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Username</maml:name><maml:description><maml:para>Username of the service account. Cannot be used with -ServiceCredential. For local service accounts use one of the following usernames omitting the -SecurePassword parameter: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceCredential</maml:name><maml:description><maml:para>Windows Credential object under which the service will be setup to run. Cannot be used with -Username. For local service accounts use one of the following usernames with empty password: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PreviousPassword</maml:name><maml:description><maml:para>An old password of the service account. Optional when run under local admin privileges.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>New password of the service account. The function will ask for a password if not specified. MSAs and local system accounts will ignore the password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRestart</maml:name><maml:description><maml:para>Do not immediately restart the service after changing the password. **Note that the changes will not go into effect until you restart the SQL Services**</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ComputerName</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Credential</maml:name><maml:description><maml:para>Windows Credential with permission to log on to the server running the SQL instance</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of services. Basically, any object that has ComputerName and ServiceName properties. Can be piped from Get-DbaService.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoRestart</maml:name><maml:description><maml:para>Do not immediately restart the service after changing the password. **Note that the changes will not go into effect until you restart the SQL Services**</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PreviousPassword</maml:name><maml:description><maml:para>An old password of the service account. Optional when run under local admin privileges.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</maml:name><maml:description><maml:para>New password of the service account. The function will ask for a password if not specified. MSAs and local system accounts will ignore the password.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Securestring</command:parameterValue><dev:type><maml:name>Securestring</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceCredential</maml:name><maml:description><maml:para>Windows Credential object under which the service will be setup to run. Cannot be used with -Username. For local service accounts use one of the following usernames with empty password: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServiceName</maml:name><maml:description><maml:para>A name of the service on which the action is performed. E.g. MSSQLSERVER or SqlAgent$INSTANCENAME</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Username</maml:name><maml:description><maml:para>Username of the service account. Cannot be used with -ServiceCredential. For local service accounts use one of the following usernames omitting the -SecurePassword parameter: LOCALSERVICE NETWORKSERVICE LOCALSYSTEM</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Service, SqlServer, Instance, Connect Author: Kirill Kravtsov (@nvarscar) Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires Local Admin rights on destination computer(s). </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $SecurePassword = (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> PS C:\> Update-DbaServiceAccount -ComputerName sql1 -ServiceName 'MSSQL$MYINSTANCE' -SecurePassword $SecurePassword Changes the current service account's password of the service MSSQL$MYINSTANCE to 'Qwerty1234' </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $cred = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\> Get-DbaService sql1 -Type Engine,Agent -Instance MYINSTANCE | Update-DbaServiceAccount -ServiceCredential $cred Requests credentials from the user and configures them as a service account for the SQL Server engine and agent services of the instance sql1\MYINSTANCE </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-DbaServiceAccount -ComputerName sql1,sql2 -ServiceName 'MSSQLSERVER','SQLSERVERAGENT' -Username NETWORKSERVICE </dev:code><dev:remarks><maml:para> Configures SQL Server engine and agent services on the machines sql1 and sql2 to run under Network Service system user. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService sql1 -Type Engine -Instance MSSQLSERVER | Update-DbaServiceAccount -Username 'MyDomain\sqluser1' </dev:code><dev:remarks><maml:para> Configures SQL Server engine service on the machine sql1 to run under MyDomain\sqluser1. Will request user to input the account password. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaService sql1 -Type Engine -Instance MSSQLSERVER | Update-DbaServiceAccount -Username 'MyDomain\sqluser1' -NoRestart </dev:code><dev:remarks><maml:para> Configures SQL Server engine service on the machine sql1 to run under MyDomain\sqluser1. Will request user to input the account password. Will not restart, which means the changes will not go into effect, so you will still have to restart during your planned outage window. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Update-DbaServiceAccount</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Update-Dbatools</command:name><command:noun>Dbatools</command:noun><command:verb>Update</command:verb><maml:description><maml:para>Exported function. Updates dbatools. Deletes current copy and replaces it with freshest copy.</maml:para></maml:description></command:details><maml:description><maml:para>Exported function. Updates dbatools. Deletes current copy and replaces it with freshest copy.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Update-Dbatools</maml:name><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Development</maml:name><maml:description><maml:para>If this switch is enabled, the current development branch will be installed. By default, the latest official release is installed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cleanup</maml:name><maml:description><maml:para>If this switch is enabled, old versions of dbatools will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Cleanup</maml:name><maml:description><maml:para>If this switch is enabled, old versions of dbatools will be removed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Development</maml:name><maml:description><maml:para>If this switch is enabled, the current development branch will be installed. By default, the latest official release is installed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module Author: Shawn Melton (@wsmelton), wsmelton.github.io Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-Dbatools </dev:code><dev:remarks><maml:para> Updates dbatools. Deletes current copy and replaces it with freshest copy. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Update-Dbatools -dev </dev:code><dev:remarks><maml:para> Updates dbatools to the current development branch. Deletes current copy and replaces it with latest from github. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Update-Dbatools</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Watch-DbaDbLogin</command:name><command:noun>DbaDbLogin</command:noun><command:verb>Watch</command:verb><maml:description><maml:para>Tracks SQL Server logins: which host they came from, what database they're using, and what program is being used to log in.</maml:para></maml:description></command:details><maml:description><maml:para>Watch-DbaDbLogin uses SQL Server DMV's 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.</maml:para><maml:para>Running this script every 5 minutes for a week should give you a sufficient idea about database and login usage.</maml:para><maml:para>Logins from the same server are excluded from the watched set.</maml:para><maml:para>The inputs for this command are either a Central Management Server (registered server repository), a flat file of server names, or to use pipeline input via Connect-DbaInstance. See the examples for more information.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Watch-DbaDbLogin</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server that stores the Watch database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the Watch database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name of the Watch table. By default, this is DbaTools-WatchDbLogins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCms</maml:name><maml:description><maml:para>Specifies a Central Management Server to query for a list of servers to watch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServersFromFile</maml:name><maml:description><maml:para>Specifies a file containing a list of servers to watch. This file must contain one server name per line.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="6" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows pipeline input from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The name of the Watch database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Allows pipeline input from Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Server[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ServersFromFile</maml:name><maml:description><maml:para>Specifies a file containing a list of servers to watch. This file must contain one server name per line.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCms</maml:name><maml:description><maml:para>Specifies a Central Management Server to query for a list of servers to watch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The SQL Server that stores the Watch database.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The name of the Watch table. By default, this is DbaTools-WatchDbLogins.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Login Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT Requires: sysadmin access on all SQL Servers for the most accurate results </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbaDbLogin -SqlInstance sqlserver -SqlCms SqlCms1 </dev:code><dev:remarks><maml:para> A 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 table Dblogins in the DatabaseLogins database on SQL Server sqlserver. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbaDbLogin -SqlInstance sqlcluster -Database CentralAudit -ServersFromFile .\sqlservers.txt </dev:code><dev:remarks><maml:para> A 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 Dblogins in the CentralAudit database on SQL Server sqlcluster. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbaDbLogin -SqlInstance sqlserver -SqlCms SqlCms1 -SqlCredential $cred </dev:code><dev:remarks><maml:para> A 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 gathers login information and saves it to the table Dblogins in the DatabaseLogins database on sqlserver. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $instance1 = Connect-DbaInstance -SqlInstance sqldev01 </dev:code><dev:remarks><maml:para> PS C:\> $instance2 = Connect-DbaInstance -SqlInstance sqldev02 PS C:\> $instance1, $instance2 | Watch-DbaDbLogin -SqlInstance sqltest01 -Database CentralAudit Pre-connects two instances sqldev01 and sqldev02 and then using pipelining sends them to Watch-DbaDbLogin to enumerate processes and gather login info. The resulting gathered info is stored to the DbaTools-WatchDbLogins table in the CentralAudit database on the sqltest01 instance. Note: This is the method to use if the instances have different credentials than the instance used to store the watch data. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Watch-DbaDbLogin</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Watch-DbatoolsUpdate</command:name><command:noun>DbatoolsUpdate</command:noun><command:verb>Watch</command:verb><maml:description><maml:para>Just for fun - checks the PowerShell Gallery every 1 hour for updates to dbatools. Notifies once per release.</maml:para></maml:description></command:details><maml:description><maml:para>Just for fun - checks the PowerShell Gallery every 1 hour for updates to dbatools. Notifies once max per release.</maml:para><maml:para>Anyone know how to make it clickable so that it opens an URL?</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Watch-DbatoolsUpdate</maml:name></command:syntaxItem></command:syntax><command:parameters></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Module, Watcher Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbatoolsUpdate </dev:code><dev:remarks><maml:para> Watches the gallery for updates to dbatools. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Watch-DbatoolsUpdate</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Watch-DbaXESession</command:name><command:noun>DbaXESession</command:noun><command:verb>Watch</command:verb><maml:description><maml:para>Watch live XEvent Data as it happens</maml:para></maml:description></command:details><maml:description><maml:para>Watch live XEvent Data as it happens. This command runs until you stop the session, kill the PowerShell session, or Ctrl-C.</maml:para><maml:para>Thanks to Dave Mason (@BeginTry) for some straightforward code samples https://itsalljustelectrons.blogspot.be/2017/01/SQL-Server-Extended-Event-Handling-Via-Powershell.html</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Watch-DbaXESession</maml:name><command:parameter required="false" position="0" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts an XESession object returned by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the enumeration object is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Accepts an XESession object returned by Get-DbaXESession.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.XEvent.Session[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.XEvent.Session[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the enumeration object is returned.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Session</maml:name><maml:description><maml:para>Only return a specific session. Options for this parameter are auto-populated from the server.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2008 or higher.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: ExtendedEvent, XE, XEvent Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbaXESession -SqlInstance sql2017 -Session system_health </dev:code><dev:remarks><maml:para> Shows events for the system_health session as it happens. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Watch-DbaXESession -SqlInstance sql2017 -Session system_health | Export-Csv -NoTypeInformation -Path C:\temp\system_health.csv </dev:code><dev:remarks><maml:para> Exports live events to CSV. Ctrl-C may not not cancel out of it - fastest way is to stop the session. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2017 -Session system_health | Start-DbaXESession | Watch-DbaXESession | Export-Csv -NoTypeInformation -Path C:\temp\system_health.csv </dev:code><dev:remarks><maml:para> Exports live events to CSV. Ctrl-C may not not cancel out of this. The fastest way to do so is to stop the session. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Watch-DbaXESession</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"><command:details><command:name>Write-DbaDbTableData</command:name><command:noun>DbaDbTableData</command:noun><command:verb>Write</command:verb><maml:description><maml:para>Writes data to a SQL Server table.</maml:para></maml:description></command:details><maml:description><maml:para>Writes a .NET DataTable to a SQL Server table using SQL Bulk Copy.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Write-DbaDbTableData</maml:name><command:parameter required="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the Input Object data will be written.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="named" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>This is the DataTable (or data row) to import to SQL Server. It is very important to understand how different types of objects are beeing processed to get the best performance. The best performance is achieved when using the DataSet data type. If the data to be imported are determined with Invoke-DbaQuery, the option "-As DataSet" should be used. Then all records are imported in a single call of SqlBulkCopy. Also the data type DataTable can lead to an import of all records in a single call of SqlBulkCopy. However, it should be noted that "$varWithDataTable | Write-DbaDbTableData" causes the pipeline to convert the single object of type DataTable to a series of objects of type DataRow. These in turn lead to single calls of SqlBulkCopy per record, which negatively affects performance. This is also the reason why the use of the DataRow data type is generally discouraged. When using objects of type PSObject, these are first all combined into an internal object of type DataTable and then imported in a single call of SqlBulkCopy.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" position="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table name to import data into. You can specify a one, two, or three part table name. If you specify a one or two part name, you must also use -Database. If the table does not exist, you can use -AutoCreateTable to automatically create the table. The table will be created with sub-optimal data types such as nvarchar(max). If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to import to a table named 'Table' on schema 'First' and database 'dbo'. The correct way to import to a table named 'First.Table' on schema 'dbo' is by passing dbo.[First].[Table]. Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to import to a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]].</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Defaults to dbo if no schema is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. Defaults to 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>If this switch is enabled, the table will be created if it does not already exist. The table will be created with sub-optimal data types such as nvarchar(max).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>By default, the bulk insert tries to automap columns. When it doesn't work as desired, this parameter will help. Check out the examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseDynamicStringLength</maml:name><maml:description><maml:para>By default, all string columns will be NVARCHAR(MAX). If this switch is enabled, all columns will get the length specified by the column's MaxLength property (if specified).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>AutoCreateTable</maml:name><maml:description><maml:para>If this switch is enabled, the table will be created if it does not already exist. The table will be created with sub-optimal data types such as nvarchar(max).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BatchSize</maml:name><maml:description><maml:para>The BatchSize for the import defaults to 50000.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>BulkCopyTimeOut</maml:name><maml:description><maml:para>Value in seconds for the BulkCopy operations timeout. The default is 30 seconds.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CheckConstraints</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to process check constraints will be enabled. Per Microsoft "Check constraints while data is being inserted. By default, constraints are not checked."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ColumnMap</maml:name><maml:description><maml:para>By default, the bulk insert tries to automap columns. When it doesn't work as desired, this parameter will help. Check out the examples for more information.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Hashtable</command:parameterValue><dev:type><maml:name>Hashtable</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Database</maml:name><maml:description><maml:para>The database where the Input Object data will be written.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FireTriggers</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to fire insert triggers will be enabled. Per Microsoft "When specified, cause the server to fire the insert triggers for the rows being inserted into the Database."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>This is the DataTable (or data row) to import to SQL Server. It is very important to understand how different types of objects are beeing processed to get the best performance. The best performance is achieved when using the DataSet data type. If the data to be imported are determined with Invoke-DbaQuery, the option "-As DataSet" should be used. Then all records are imported in a single call of SqlBulkCopy. Also the data type DataTable can lead to an import of all records in a single call of SqlBulkCopy. However, it should be noted that "$varWithDataTable | Write-DbaDbTableData" causes the pipeline to convert the single object of type DataTable to a series of objects of type DataRow. These in turn lead to single calls of SqlBulkCopy per record, which negatively affects performance. This is also the reason why the use of the DataRow data type is generally discouraged. When using objects of type PSObject, these are first all combined into an internal object of type DataTable and then imported in a single call of SqlBulkCopy.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepIdentity</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve source identity values will be enabled. Per Microsoft "Preserve source identity values. When not specified, identity values are assigned by the destination."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>KeepNulls</maml:name><maml:description><maml:para>If this switch is enabled, the SqlBulkCopy option to preserve NULL values will be enabled. Per Microsoft "Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable."</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NoTableLock</maml:name><maml:description><maml:para>If this switch is enabled, a table lock (TABLOCK) will not be placed on the destination table. By default, this operation will lock the destination table while running.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import. Defaults to 5000 rows.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schema</maml:name><maml:description><maml:para>Defaults to dbo if no schema is specified.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlInstance</maml:name><maml:description><maml:para>The target SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">DbaInstanceParameter</command:parameterValue><dev:type><maml:name>DbaInstanceParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Table</maml:name><maml:description><maml:para>The table name to import data into. You can specify a one, two, or three part table name. If you specify a one or two part name, you must also use -Database. If the table does not exist, you can use -AutoCreateTable to automatically create the table. The table will be created with sub-optimal data types such as nvarchar(max). If the object has special characters please wrap them in square brackets [ ]. Using dbo.First.Table will try to import to a table named 'Table' on schema 'First' and database 'dbo'. The correct way to import to a table named 'First.Table' on schema 'dbo' is by passing dbo.[First].[Table]. Any actual usage of the ] must be escaped by duplicating the ] character. The correct way to import to a table Name] in schema Schema.Name is by passing [Schema.Name].[Name]]].</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Truncate</maml:name><maml:description><maml:para>If this switch is enabled, the destination table will be truncated after prompting for confirmation.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UseDynamicStringLength</maml:name><maml:description><maml:para>By default, all string columns will be NVARCHAR(MAX). If this switch is enabled, all columns will get the length specified by the column's MaxLength property (if specified).</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Table, Data, Insert Author: Chrissy LeMaire (@cl), netnerds.net Website: https://dbatools.io Copyright: (c) 2018 by dbatools, licensed under MIT License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\> Write-DbaDbTableData -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers Performs 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, the import will be halted. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $tableName = "MyTestData" </dev:code><dev:remarks><maml:para> PS C:\> $query = "SELECT name, create_date, owner_sid FROM sys.databases" PS C:\> $dataset = Invoke-DbaQuery -SqlInstance 'localhost,1417' -SqlCredential $containerCred -Database master -Query $query -As DataSet PS C:\> $dataset | Write-DbaDbTableData -SqlInstance 'localhost,1417' -SqlCredential $containerCred -Database tempdb -Table $tableName -AutoCreateTable Pulls data from a SQL Server instance and then performs a bulk insert of the dataset to a new, auto-generated table tempdb.dbo.MyTestData. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\> Write-DbaDbTableData -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers -AutoCreateTable -Confirm Performs 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. Prompts for confirmation before a variety of steps. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\> Write-DbaDbTableData -SqlInstance sql2014 -InputObject $DataTable -Table mydb.dbo.customers -Truncate Performs 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 prompted again to perform the import. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\> Write-DbaDbTableData -SqlInstance sql2014 -InputObject $DataTable -Database mydb -Table customers -KeepNulls Performs 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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $passwd = (Get-Credential NoUsernameNeeded).Password </dev:code><dev:remarks><maml:para> PS C:\> $AzureCredential = New-Object System.Management.Automation.PSCredential("AzureAccount"),$passwd) PS C:\> $DataTable = Import-Csv C:\temp\customers.csv PS C:\> Write-DbaDbTableData -SqlInstance AzureDB.database.windows.net -InputObject $DataTable -Database mydb -Table customers -KeepNulls -SqlCredential $AzureCredential -BulkCopyTimeOut 300 This performs the same operation as the previous example, but against a SQL Azure Database instance using the required credentials. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $process = Get-Process </dev:code><dev:remarks><maml:para> PS C:\> Write-DbaDbTableData -InputObject $process -SqlInstance sql2014 -Table "[[DbName]]].[Schema.With.Dots].[`"[Process]]`"]" -AutoCreateTable Creates 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 information into the table Writes the results of Get-Process to a table named: "[Process]" in schema named: Schema.With.Dots in database named: [DbName] The Table name, Schema name and Database name must be wrapped in square brackets [ ] Special characters like " must be escaped by a ` character. In addition any actual instance of the ] character must be escaped by being duplicated. This 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 thanks to ConvertTo-DbaDataTable. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\> </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance SRV1 </dev:code><dev:remarks><maml:para> PS C:\> $server.Invoke("CREATE TABLE tempdb.dbo.test (col1 INT, col2 VARCHAR(100))") PS C:\> $data = Invoke-DbaQuery -SqlInstance $server -Query "SELECT 123 AS value1, 'Hello world' AS value2" -As DataSet PS C:\> $data | Write-DbaDbTableData -SqlInstance $server -Table 'tempdb.dbo.test' -ColumnMap @{ value1 = 'col1' ; value2 = 'col2' } The dataset column 'value1' is inserted into SQL column 'col1' and dataset column value2 is inserted into the SQL Column 'col2'. All other columns are ignored and therefore null or default values. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Write-DbaDbTableData</maml:uri></maml:navigationLink></maml:relatedLinks></command:command></helpItems> |